me.apla.cordova.app-preferences icon indicating copy to clipboard operation
me.apla.cordova.app-preferences copied to clipboard

Are there any examples?

Open halindrome opened this issue 9 years ago • 4 comments

The documentation is a little thin. I don't really even know where to get started. Are there any examples?

halindrome avatar Nov 13 '15 00:11 halindrome

You can check the README.md file, very clear :)

stefhenry avatar Nov 13 '15 00:11 stefhenry

Hmm - I did look at README.md. It has good documentation on the API, but I really don't quite understand how to get from "here is a list of things I want in a preference panel set" to "my application shows its preferences panels when the user clicks here". That's what I meant by an example.

halindrome avatar Nov 13 '15 13:11 halindrome

This plugin contains 2 parts:

  1. Javascript interface to access preferences;
  2. Native preferences interface generator.

Seems like you need to use preference generator. And preference generator docs is thin. Here is some notes on how to achieve what do you want:

  1. Install latest version of plugin. After plugin is installed, you can inspect app-settings.json in app folder (or here).
  2. There is supported fields list: https://github.com/apla/me.apla.cordova.app-preferences#preferences-interface-generator
  3. Please run cordova prepare after app-settings.json modification
  4. In your app call appPreferences.show() to display preferences. Please note, on android preferences don't reflect default values (#62).

apla avatar Nov 15 '15 01:11 apla

Hi,I'm quite new to this too.For what I know, MDM can set some app configuration values for application. For example, I need email address to be retrieved from MDM. (http://www.appconfigforenterprise.org/dev-center/)How can I get the value by this plugin? I'm quite lost about all this. Like: What does the app-settings.json do? Does it populate plist/xml file for application? Would that be enough if I just add the EmailAddress key in the app-settings.json?

BTW, how can I test the scenario like above?

Your help would be really appreciated! This would be much helpful if you could provide the newbies with some sample application(ionic or other frameworks) !!

Thanks anyway.

sylfree9999 avatar Jan 27 '16 14:01 sylfree9999