Software Archive
Read-only legacy content
17061 Discussions

Push Plugin icon error

LiveStudio_D_
Beginner
332 Views

Hello!

I would like to ask for your help regarding a problem.
The phonegap-plugin-push (v1.4.3) only shows the icon on every device in the notification zone, if I set the "android-targetSdkVersion" to 20. But I need to set it to at least 23 because in Google Play I can not upload the apk file. It says in an earlier application the settings are on 23 and now 20 is not acceptable anymore, so I can not upload the newer version. I tried updating and refreshing the "phonegap-plugin-push", but then it does not build the XDK, because it shows "gradle script" error. I attached some pictures of my current configuration. Can you help me how I can get the the plugin to show all the icons on a 23 sdk version? (all the icon sizes are available, I don't think this would be the problem)

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
332 Views

If I understand the situation correctly, you previously submitted a version of your app that was built with the "Target API" set to 23, and now you want to build with 20. Why don't you just set it back to 23?

0 Kudos
LiveStudio_D_
Beginner
332 Views

Hello!

In my previous comment I wrote that with the 23 sdk setting the phonegap-plugin-push (v1.4.3) notification icon does not show up on several devices. I tried updating the plugin, but then the XDK does not build the app because of "gradle script" error. I just want to make sure the notification icon shows up on every device. Do you have any suggestions? Thanks in advance

0 Kudos
PaulF_IntelCorp
Employee
332 Views

I'm confused by your explanation of the problem, I'll try to repeat what I believe you are saying, below:

  • Your app must build your app with a "Target API" of 20 in order for the notification icon to show up on all devices.
  • The version of your app that is currently in the store was built with the "Target API" set to 23.
  • If you build with the "Target API" set to 20, the Google store will not accept your app, claiming it must be set to 23.

It appears the gist of the issue is the significant change in the way Android app permissions are handled starting with Android 6 (API level 23) when compared to the older versions of Android (API 22 and lower). See this SO post for some details > http://stackoverflow.com/questions/35179654/google-play-dont-let-me-update-my-app/35182120#35182120 < which contains a link to an Android developer page with even more details regarding this change.

If my understanding of your situation (above bullets) is correct, then I recommend trying one of the following options (keep in mind that I have no idea why the icons are not showing up, so I'm speculating on the possible solutions -- the plugin author is the best person to query regarding the best solution to the problem -- I'm guessing it is based on some of the issues in the 1.9.3 release):

  • Assuming you are building with Crosswalk, try building without Crosswalk and targeting Android 4.4 and greater devices with the new build (set the Min Android API to 19). When you submit this new version of your app to the store, the old version will still be used for Android 4.0-4.3 devices (API levels 14-18) and the new version will be used for Android 4.4 and later. Depending on the UI complexity of your app, you might have to set the Min API level to 21, rather than 19.
     
  • Try a later version of the phonegap-plugin-push. The newer versions need to have their gradle script removed in order to use them. Also, I see that there is now a "hooks" script included in that plugin (appears to have been added with the 1.8.2 release of the plugin).

    The Intel XDK Android build system is not compatible with the latest versions of this plugin (due to the use of plugin gradle scripts). See this FAQ article for instructions on how to modify a gradle version of this plugin and make it compatible with the Intel XDK Android build system for use with your app. Also, see this article for details on how to make this plugin work with iOS apps. I'm referencing version 1.8.1 in the link above, in case the hooks script causes troubles, but you should also try the 1.10.2 version, which is the latest, to see if it works, since the hooks script is limited to Windows builds.

    NOTE: No gradle modifications are necessary to make this plugin work with the XDK iOS and Windows build systems. Follow the instructions above to add a later version to your project that will build with Android. You will have to add the later version of the plugin using the 'Third-Party Plugin' procedure.
     
  • Try using PhoneGap Build (use the XDK version 3922 "Cordova Build Package" tool on the Build tab). Our build system will be retired at the end of June, so now is a good time to start using alternative build solutions! See this note from the plugin author > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PHONEGAP_BUILD.md < for help with that plugin and PhoneGap Build, if you experience build issues there -- they may have been resolved, that post is getting old now.
     
  • Try using Cordova CLI (also via the 3922 "Cordova Build Package" export tool). This is guaranteed to work, because you get the maximum flexibility and control over the build process, but it does require more investment in time and effort on your part to get the build system setup and working.

Beyond that, I suggest you work with the plugin author to understand why you are seeing this problem >

https://github.com/phonegap/phonegap-plugin-push < and how to best resolve it.

0 Kudos
Reply