MrTechGadget / cordova-plugin-appconfig

Cordova Plugin supporting AppConfig.org standard settings. Works with Ionic.
Other
2 stars 2 forks source link

The plugin doesn't work for android? This app doesn't support app configuration #1

Open ghuang0207 opened 7 years ago

ghuang0207 commented 7 years ago

I am using ionic2 with your plugin. We are using airwatch in our enterprise.

We are trying to get the value from the key: EnrollmentUser from user's device.

We published our code through Google Play, set as internal use only. We saw an error message in the airwatch console "This app doesn't support app configuration", when we tried to enable "Send Application Configuration" from the airwatch console. ( the same exact code works for iOS).

ujjwalgarad commented 7 years ago

I ran into the same exact issue and have been looking for the solution for many days. It works of iOS but not for Android. This is very strange. Did anyone find the solution yet?

theaccordance commented 7 years ago

Having the same problem as well. Has anyone checked platforms/android/AndroidManifest.xml to see if the plugin injects the necessary properties?

MrTechGadget commented 7 years ago

That was my thought as well. This same problem has been logged with the original oracle project that I forked this from. On Thu, Aug 31, 2017 at 8:24 AM Joe Mainwaring notifications@github.com wrote:

Having the same problem as well. Has anyone checked platforms/android/AndroidManifest.xml to see if the plugin injects the necessary properties?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/audioeng/cordova-plugin-appconfig/issues/1#issuecomment-326330617, or mute the thread https://github.com/notifications/unsubscribe-auth/AQVLdabq0tkhtqrpngvYboosViTxmUhDks5sdtBEgaJpZM4O-qt5 .

theaccordance commented 7 years ago

If I'm reading the Android documentation correctly for configuring an application for managed configurations, the plugin needs to do the following to enable the functionality:

  1. Add a property to platforms/android/AndroidManifest.xml within the <application> block:

<meta-data android:name="android.content.APP_RESTRICTIONS" android:resource="@xml/app_restrictions" />

  1. Add a XML file which defines the properties exposed via AppConfig: platforms/android/res/xml/app_restrictions.xml

As far as I can tell looking at the plugin, it's doing neither. My suspicion is supported by the fact that we don't define anything in Cordova's config.xml file to even define the restrictions, which is something I have to do for other plugins like Deeplinks.

MrTechGadget commented 7 years ago

Thank you for finding this, I suspect you are correct. I see you also posted this on the oracle project page, thanks for that.

Now that they have fixed the issue with ionic in v1.0.1+, I plan on moving my sample project back to using their plugin, so that is definitely the best place to have that discussion. On Thu, Aug 31, 2017 at 9:55 AM Joe Mainwaring notifications@github.com wrote:

If I'm reading the Android documentation https://developer.android.com/work/managed-configurations.html correctly for configuring an application for managed configurations, the plugin needs to do the following to enable the functionality:

  1. Add a property to platforms/android/AndroidManifest.xml within the block:

<meta-data android:name="android.content.APP_RESTRICTIONS" android:resource="@xml/app_restrictions" />

  1. Add a XML file which defines the properties exposed via AppConfig: platforms/android/res/xml/app_restrictions.xml

As far as I can tell looking at the plugin, it's doing neither. My suspicion is supported by the fact that we don't define anything in Cordova's config.xml file to even define the restrictions, which is something I have to do for other plugins like Deeplinks.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/audioeng/cordova-plugin-appconfig/issues/1#issuecomment-326357610, or mute the thread https://github.com/notifications/unsubscribe-auth/AQVLdQTE1uJD0uCVUjz8qem-pVE93Dsoks5sduWDgaJpZM4O-qt5 .

ghuang0207 commented 7 years ago

Hi Joshua,

Could you please let us know where is the plugin you were mentioning about? I can try to build an ionic2 version sample code for this..

Thank you to Joshua and Joe and Ujjwal :-)

George

"Now that they have fixed the issue with ionic in v1.0.1+, I plan on moving my sample project back to using their plugin"

lucaverrascina commented 6 years ago

Maybe he was referring to cordova-plugin-emm-app-config by Oracle. I haven't tested it yet

MrTechGadget commented 6 years ago

Yes, I am referring to the original plugin by oracle that I forked. They have since fixed the problem that I forked it for, and there has been discussion about the manual steps a user must take to get it working on Android.

I have a sample Ionic 2+ example project, you don’t need to write one yourself. https://github.com/audioeng/ionic-appconfig

I have done a little work merging it back to use the oracle plugin, but have not merged that back into master yet.