Sample Program Versioning

George, I see where you’re about to change the samples again (PhoneGap fun). When you update the samples, how do I get the latest sample projects? How do I know they are the latest? or if there were changes since the last time I downloaded them? Are the samples tied to the release version - 7.4.2.0 for example, the current download, and if you put out new samples, would the version be 7.4.2.1 etc.?

Yes. If we update anything in the release, we bump the version number. You can see what has been changed in each version here:

https://wiki.appstudio.dev/Version_7

When are you planning on releasing the new samples with the Density fix, etc. Especially the PhoneGap samples that currently do not work. I see no sense in fixing them myself, if you are doing it (the correct way). Then I’ll test it all out again. Hopefully I won’t find anything this time around.

George, it would be real helpful if that version list page had the release date included. I believe the 7.4.2.0 was August 1, and many of the files have that date.

You can see the dates in our blog and twitter feed.

The PhoneGap Samples (Section 5 ONLY) were designed to work and create working Andriod and IOS and Web Apps. (IOS requires payment to create an app). I’m currently testing this set of sample apps, as there are many changes needed for the PhoneGap 9.0.0 release, and I’ve had issues with Geolocation function on Andriod App.

George - Do the Section 5 PhoneGap samples work with:

Run - Make Native App with PhoneGap Build

Run - Make Native App with PhoneGap CLI

Will they work, out of the box, on both or just one?

Thanks

Gary

We recommend people use PhoneGap Build. It’s MUCH easier than PhoneGap CLI.

Accordingly, all the PhoneGap samples have been tested with PGB.

I get errors when building the PhoneGap API Sample (7.4.2.0 - Section 5 of Samples) in PhoneGap. Here’s the details:

I copied the javascript phonegapapi sample project folder to my working folder for projects - all subfolders, etc.

I opened the project, and tried in on the desktop browser. It ran, but nothing works - it’s a desktop - it’s not supposed to.

Next I used Run = Build Native App with PhoneGap Build. It failed. The logs show the following:

Installing "cordova-plugin-compat" at "1.2.0" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 8.0.0, failed version requirement: 
      <6.3.0
Skipping 'cordova-plugin-compat' for android

and this, which is actually killing the ability to create the apk:

> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  /var/gimlet/tmp/47198922588420/3686124/app/build/intermediates/merged_manifests/debug/AndroidManifest.xml:32: AAPT: error: resource mipmap/ic_launcher (aka com.nsbasic.PhoneGapAPI:mipmap/ic_launcher) not found.
      
  error: failed processing manifest.

At this point, I went back to a working (Pre August 1st) simple test project that did create a working apk on July 27th on the old PhoneGap. I changed the samples config.xml to correspond to mine (after tweaking it some for 9.0.0 - see https://discuss.appstudio.dev/t/app-icon-quality/1799). Here’s the differences:

line 3 - change to https:// (I’m not sure this change matters)
lines 17 thru 21 - change qualifier= to density=
lines 47 and 48 - remove gap: (I’m not sure this change matters)
add these lines before the </widget>:

<plugin name="cordova-plugin-statusbar" source="npm" />
  <preference name="StatusBarOverlaysWebView" value="{phoneGapStatusBarOverlay}" />
  <preference name="StatusBarBackgroundColor" value="{phoneGapStatusBarColor}" />
  <preference name="StatusBarStyle" value="{phoneGapStatusBarStyle}" />

Now the sample works when installed (either signed or not - if not - you’ll have to uninstall and reinstall any changes). However, there are still warnings, if not errors, in phonegap:

Fetching plugin “cordova-plugin-compat@^1.1.0” via npm
Installing “cordova-plugin-compat” at “1.2.0” for android
Plugin doesn’t support this project’s cordova-android version. cordova-android: 8.0.0, failed version requirement:
<6.3.0
Skipping ‘cordova-plugin-compat’ for android

It’s not really an error, but it seems like it should be cleaned up too.

George, you mentioned in another post you were fixing the samples for the density= parameter. Can you put the needed above changes in too?

Thanks

This shows a couple of bugs in PhoneGap Build.

The message about cordova-plugin-compat seems to happen no matter what you do - but does not interfere with the actual apk.

The build process is not 100% reliable. About 1 out of 3 builds fail with a message like your Resource Linking failed. The solution is to run the build again.

We will be changing qualifier= to density= in a future build.

George, any comment on the GAP namespace and why/if it is used/needed.

Sorry, no. You’ll have to see if PhoneGap has anything in their docs.

PhoneGap isn’t developed or supported by us. We can only share our own experiences of what works and does not work. We’re just another user.

No problem. Understandable. And thanks - it took some time, but I’m getting there.