Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings.bundle file for Android? #55

Closed
shredmer opened this issue Oct 22, 2015 · 9 comments
Closed

Settings.bundle file for Android? #55

shredmer opened this issue Oct 22, 2015 · 9 comments

Comments

@shredmer
Copy link

For starters, I do not have the dev experience most of you have posting here but I am having trouble getting this plugin to work for Android and figured this is where I would get the most informative response.

Yesterday I installed the plugin and was able to read from my Root.plist file in the Settings.bundle file for iOS. To do so required copying the Settings.bundle into my Xcode project.

Is there a similar step or file to copy over for Android? I have not defined a key or value for android so I assume this is the issue. Also, I receive the following error while trying to emulate for Android:

Error Code:
    1
  Output:
    /Users/shredmer/Applications/NoHarm_Basic2/platforms/android/build/intermediates/res/debug/xml/apppreferences.xml:2: error: Error: No resource found that matches the given name (at 'entries' with value '@array/apppreferences_lang').

    /Users/shredmer/Applications/NoHarm_Basic2/platforms/android/build/intermediates/res/debug/xml/apppreferences.xml:2: error: Error: No resource found that matches the given name (at 'entryValues' with value '@array/apppreferences_langValues').

Thank you for your help.

@lakano
Copy link

lakano commented Oct 26, 2015

Hello,

I have the same error too :(
Regards,

@lakano
Copy link

lakano commented Oct 26, 2015

@shredmer To not be blocked, you can get an old version:

git clone --single-branch -b "version/0.6.1" https://github.com/apla/me.apla.cordova.app-preferences.git path/where/you/want/cordova-app-preferences-0.6.1

and then in your project path:

ionic plugin add /where/you/want/cordova-app-preferences-0.6.1

Regards,

@shredmer
Copy link
Author

Thanks, that fixed the build error. However, I am still having difficulty reading the settings value for Android. Which file are you using for the settings? Is it android/res/xml/apppreferences.xml ? If so how did you get it to read from the file correctly? I have been trying to read the value by using the key identity but could only get it to work in iOS still.

@LightZam
Copy link

LightZam commented Nov 4, 2015

i used this workaround

cordova plugin add [email protected]

@bitflower
Copy link

@LightZam thanks, confirmed. Got it running with 0.7.1

Be sure to
ionic plugin rm cordova-plugin-app-preferences
ionic platform rm YOUR-OS

and re-add both afterwards

UPDATE: Not true, @shredmer is right, the build will work but then the XML will be missing and therefore Android will not create any OS preferences.

bitflower added a commit to bitflower/me.apla.cordova.app-preferences that referenced this issue Nov 9, 2015
Corrected the path to the values xml file.
bitflower pushed a commit to bitflower/me.apla.cordova.app-preferences that referenced this issue Nov 9, 2015
apla pushed a commit that referenced this issue Nov 9, 2015
Corrected the path to the values xml file.
This was referenced Nov 9, 2015
@bitflower
Copy link

I can confirm that this works as of v0.7.4.

@apla
Copy link
Owner

apla commented Nov 15, 2015

@shredmer have you tried 0.7.4?

@shredmer
Copy link
Author

Yes, 0.7.4 builds fine. Thank you

@sylfree9999
Copy link

@shredmer Hi, I have found your problem in [stackoverflow()] about the app integration with Airwatch. I don't have enough reputation so I have no choice but to ask here. sorry ! I am wondering if you have successfully solve this issue? Do you use Airwatch App Wrapping or SDK or ACE?(http://stackoverflow.com/questions/33400087/retrieving-username-through-mdm-by-configuring-enterprise-app-preferences-airwa)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants