Created
May 15, 2012 08:34
-
-
Save niths/2700063 to your computer and use it in GitHub Desktop.
PrivateStorage plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.phonegap.plugins.privateStorage; | |
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import android.util.Log; | |
import com.phonegap.api.Plugin; | |
import com.phonegap.api.PluginResult; | |
/** | |
* | |
* @author NITHs | |
* | |
* Store your application secret key here | |
* | |
*/ | |
public class PrivateStorage extends Plugin { | |
@Override | |
public PluginResult execute(String action, JSONArray data, String callbackId) { | |
JSONArray jsonRes = null; | |
try { | |
jsonRes = new JSONArray(); | |
jsonRes.put(new JSONObject().put("devtoken", "your_devtoken")); | |
jsonRes.put(new JSONObject().put("apptoken","your_apptoken")); | |
} catch (JSONException e) { | |
Log.e("ERROR", e.getMessage()); | |
} | |
return new PluginResult(PluginResult.Status.OK, jsonRes); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment