Beispiel #1
0
 public void postResult(JSONArray args) {
   try {
     JSONArray result = new JSONArray();
     result.put(0, mCallbackId);
     for (int i = 0; i < args.length(); i++) {
       result.put(i + 1, args.get(i));
     }
     Log.w(TAG, "postResult: " + result.toString());
     mExtension.postMessage(mInstanceId, result.toString());
   } catch (JSONException e) {
     Log.e(TAG, e.toString());
   }
 }
Beispiel #2
0
 public void postResult(byte[] buffer) {
   mExtension.postBinaryMessage(mInstanceId, buffer);
 }
Beispiel #3
0
 public ExtensionInstanceHelper getInstanceHelper() {
   return mExtension.getInstanceHelper(mInstanceId);
 }