Sorry. I do not get it how to paste the code. If interested please tell me your email address and I will send it directly.
Update: code snippet attached
Pay attention to the config.xml section. Your config.xml should have the same list of icons and splashscreen files. Your project folder should have all those files, in folders called icons and splash.
George, wouldn’t it be best if you corrected the samples to all have these folders, splashscreens and icons as needed by the new phonegap. I agree the link has all the info you need, if you know where the files that are needed exist - they are only in a couple of your samples - you have to know the names to search for them. And yes, the names are in the config.xml
And while we’re on this subject, many of the samples did not and, of course, still do not work with the current phonegap to build a working Android or IOS build. The one that comes to mind is Geolocation sample (either Basic or Javascript) topic: Manifest for Android - Allow Permissions - #21 by PPetree. It’s missing the definitions in the config.xml for the location services to be a permitted permission of the built app. Phil Petree worked with me extensively this past weekend, and he agrees, your samples are not complete. This would be best for newbees to have fully working samples. And the latest Geolocation now has a google maps call that also fails, as google now requires you to register as a developer (free unless your usage is tremendous). You have to add the api keys to the URL for it to be successful. I think you either take the map out of the sample, or show the URL with dummy API keys, or bite the bullet and get a set of keys for the samples. You can limit the cost to zero in the admin panel of google maps developer site. The first $200 worth of api calls every month are free - several hundred thousand calls per month.
Thanks Gary
@GaryGorsline, are you using AppStudio 7.4.2? We released it right after the update to PhoneGap Build. The samples were all brought in line with the new requirements. All were tested.
George - yes 7.4.2.0 I downloaded when you posted it was available. It definitely was an update from the one I downloaded about 4 weeks ago, as the geolocation had the map added. Thanks in advance.
Look back at my post 9:35am 8/8 (today). Geolocation basic or javascript. Let’s just start there - most of the samples have issues with phonegap. The sample doesn’t have those folders (icons and splash), and the extraFiles doesn’t include them and most important is that the permitted permission of location services is not in the config.xml. Did you try to use the sample? I copied the sample project to a regular project, all the folders as is, and these issues are there in my copy as well as the original sample folder. Thanks Let me know if you need additional info.
After few tried, i finally manage to solve the problem as below
copy icons and splash folder for one of nsbasic sample project folder (ie: C:\Program Files (x86)\NSB AppStudio\samples\BASIC\5. PhoneGap and Electron\PhoneGapBarcode.appstudio)
rename all file from default.png to splash.png (due to config.xml) in splash\android\ folders(all files must rename or you will get “Error: Android linking failed”
In additional, I found that icon and splashscreen properties is not workable. i have to rename and replace my own png file into icons\android or splash\android\xxx with correct resolution file name (ie ldpi.png or splash.png)
Lastly, after a new apk file is generated from PHG. you must uninstall the existing app in order to install newly apk. When install newly apk, a “play security” message is prompted, if you select cancel, then this apk cannot be install anymore until another newly apk is generated (or downloaded) from PHG
The initial post was with the device features sample. In the most recent post for the 7.4.2.0, I inadvertently pulled the geolocation sample from social and media when retrying, now I see why there’s a map in it - two different samples. Ah , so only that one group of samples works with phonegap . Got it. Let me go back and see where that takes me. Thanks George and Phil.
@dkteo, you may have copied from an older version of AppStudio, before it was updated for the new PhoneGap. I just checked the samples folder - the icons and splash filenames are all updated.