Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ef7c6ccfb7

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README.md
Resources.js
ResourcesPlugin.java

README.md

Resources plugin for Phonegap (Android)

By Olivier Brand

Adding the Plugin to your project

  1. To install the plugin, move Resources.js to your project's www folder and include a reference to it in your html files.

    <script src="Resources.js"></script>

  2. Create a folder called 'com/phonegap/plugin/resources' within your project's src folder.

  3. And copy the java file into that new folder.
    mkdir -p /src/com/phonegap/plugin/resources
    cp ./ResourcesPlugin.java /src/com/phonegap/plugin/resources
  1. Add a plugin line to res/xml/plugins.xml

    <plugin name="Resources" value="com.phonegap.plugin.resources.ResourcesPlugin" />

Using the plugin

res/values/strings.xml



    mylogin
    /someuri



    
this.resources = window.plugins.resources.getStringResources({
              'resources': [
                   'base_uri', 'login'
               ],
               'package': 'com.androidapp.app'
 });
 
console.log(this.resources.base_uri);
 
Something went wrong with that request. Please try again.