Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 713BDC0C8 for ; Wed, 6 Jun 2012 21:36:06 +0000 (UTC) Received: (qmail 33319 invoked by uid 500); 6 Jun 2012 21:36:06 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 33133 invoked by uid 500); 6 Jun 2012 21:36:06 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 33089 invoked by uid 99); 6 Jun 2012 21:36:05 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 21:36:05 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A3731106E0; Wed, 6 Jun 2012 21:36:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bowserj@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/10] android commit: Massive Merge Commit of DEATH TO SPACES Message-Id: <20120606213605.A3731106E0@tyr.zones.apache.org> Date: Wed, 6 Jun 2012 21:36:05 +0000 (UTC) Updated Branches: refs/heads/CordovaWebView 03aaab6f8 -> 81195db87 Massive Merge Commit of DEATH TO SPACES Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/81195db8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/81195db8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/81195db8 Branch: refs/heads/CordovaWebView Commit: 81195db87d79c51b5b5a10a557619f7cb5d02d32 Parents: 03aaab6 d3e24b0 Author: Joe Bowser Authored: Wed Jun 6 14:35:45 2012 -0700 Committer: Joe Bowser Committed: Wed Jun 6 14:35:45 2012 -0700 ---------------------------------------------------------------------- framework/.project | 60 ++-- framework/AndroidManifest.xml | 12 +- framework/assets/www/index.html | 2 +- framework/build.xml | 12 +- framework/default.properties | 4 +- framework/res/layout/main.xml | 6 +- framework/res/values/strings.xml | 2 +- framework/res/xml/cordova.xml | 16 +- framework/res/xml/plugins.xml | 2 +- framework/src/com/phonegap/api/LOG.java | 2 +- framework/src/com/phonegap/api/PluginManager.java | 2 +- framework/src/com/phonegap/api/PluginResult.java | 38 +- .../src/org/apache/cordova/AccelListener.java | 38 +- framework/src/org/apache/cordova/App.java | 18 +- framework/src/org/apache/cordova/AudioHandler.java | 37 +- framework/src/org/apache/cordova/AudioPlayer.java | 35 +- .../org/apache/cordova/AuthenticationToken.java | 24 +- .../src/org/apache/cordova/BatteryListener.java | 10 +- .../src/org/apache/cordova/CallbackServer.java | 36 +- .../src/org/apache/cordova/CameraLauncher.java | 43 +- framework/src/org/apache/cordova/Capture.java | 24 +- .../src/org/apache/cordova/CompassListener.java | 24 +- .../src/org/apache/cordova/ContactAccessor.java | 18 +- .../org/apache/cordova/ContactAccessorSdk5.java | 247 ++++----- .../src/org/apache/cordova/ContactManager.java | 4 +- .../org/apache/cordova/CordovaChromeClient.java | 20 +- .../apache/cordova/CordovaLocationListener.java | 246 +++++----- .../org/apache/cordova/CordovaWebViewClient.java | 22 +- framework/src/org/apache/cordova/Device.java | 14 +- .../src/org/apache/cordova/DirectoryManager.java | 13 +- framework/src/org/apache/cordova/DroidGap.java | 102 ++-- framework/src/org/apache/cordova/ExifHelper.java | 28 +- framework/src/org/apache/cordova/FileTransfer.java | 6 +- .../src/org/apache/cordova/FileUploadResult.java | 18 +- framework/src/org/apache/cordova/FileUtils.java | 5 +- framework/src/org/apache/cordova/GPSListener.java | 40 +- framework/src/org/apache/cordova/GeoBroker.java | 6 +- framework/src/org/apache/cordova/HttpHandler.java | 7 +- .../cordova/LinearLayoutSoftKeyboardDetect.java | 12 +- .../src/org/apache/cordova/NetworkListener.java | 6 +- .../src/org/apache/cordova/NetworkManager.java | 16 +- framework/src/org/apache/cordova/StandAlone.java | 3 - framework/src/org/apache/cordova/Storage.java | 400 +++++++------- framework/src/org/apache/cordova/TempListener.java | 2 +- framework/src/org/apache/cordova/api/IPlugin.java | 28 +- framework/src/org/apache/cordova/api/LOG.java | 52 +- framework/src/org/apache/cordova/api/Plugin.java | 40 +- .../src/org/apache/cordova/api/PluginEntry.java | 10 +- .../src/org/apache/cordova/api/PluginManager.java | 38 +- .../src/org/apache/cordova/api/PluginResult.java | 3 +- .../org/apache/cordova/file/EncodingException.java | 8 +- .../apache/cordova/file/FileExistsException.java | 6 +- .../cordova/file/InvalidModificationException.java | 6 +- .../file/NoModificationAllowedException.java | 6 +- .../apache/cordova/file/TypeMismatchException.java | 6 +- 55 files changed, 908 insertions(+), 977 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/res/xml/cordova.xml ---------------------------------------------------------------------- diff --cc framework/res/xml/cordova.xml index 0ad5e5f,0eb8d5e..4016429 --- a/framework/res/xml/cordova.xml +++ b/framework/res/xml/cordova.xml @@@ -25,12 -25,12 +25,12 @@@ - - - + + + - + http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/com/phonegap/api/PluginManager.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/AccelListener.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/AccelListener.java index 73f5412,6422dbb..a7d448e --- a/framework/src/org/apache/cordova/AccelListener.java +++ b/framework/src/org/apache/cordova/AccelListener.java @@@ -49,10 -43,10 +42,10 @@@ public class AccelListener extends Plug public static int STARTING = 1; public static int RUNNING = 2; public static int ERROR_FAILED_TO_START = 3; - - - private float x,y,z; // most recent acceleration values - private long timestamp; // time of most recent value - private int status; // status of listener ++ + private float x,y,z; // most recent acceleration values + private long timestamp; // time of most recent value + private int status; // status of listener private int accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE; private SensorManager sensorManager; // Sensor manager @@@ -74,13 -68,12 +67,13 @@@ /** * Sets the context of the Command. This can then be used to do things like * get file paths associated with the Activity. - * + * * @param ctx The context of the main Activity. */ + public void setContext(CordovaInterface ctx) { super.setContext(ctx); - this.sensorManager = (SensorManager) ctx.getSystemService(Context.SENSOR_SERVICE); + this.sensorManager = (SensorManager) ctx.getActivity().getSystemService(Context.SENSOR_SERVICE); } /** @@@ -130,9 -123,9 +123,9 @@@ // /** * Start listening for acceleration sensor. - * - * @return status of listener - */ + * + * @return status of listener - */ ++ */ private int start() { // If already starting or running, then just return if ((this.status == AccelListener.RUNNING) || (this.status == AccelListener.STARTING)) { @@@ -217,8 -210,9 +210,8 @@@ if (this.status == AccelListener.STOPPED) { return; } - this.setStatus(AccelListener.RUNNING); - + if (this.accuracy >= SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM) { // Save time that event was received @@@ -258,7 -252,7 +251,6 @@@ private void setStatus(int status) { this.status = status; } - - private JSONObject getAccelerationJSON() { JSONObject r = new JSONObject(); try { http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/App.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/AudioHandler.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/AudioHandler.java index 1de3cfb,dce24cd..a866d4f --- a/framework/src/org/apache/cordova/AudioHandler.java +++ b/framework/src/org/apache/cordova/AudioHandler.java @@@ -56,7 -56,7 +55,6 @@@ public class AudioHandler extends Plugi /** * Executes the request and returns PluginResult. - * - * * @param action The action to execute. * @param args JSONArry of arguments for the plugin. * @param callbackId The callback id used when calling back into JavaScript. @@@ -111,7 -111,7 +109,6 @@@ /** * Identifies if action to be executed returns a value and should be run synchronously. - * - * * @param action The action to execute * @return T=returns value */ @@@ -136,13 -136,12 +133,13 @@@ } /** - * Called when a message is sent to plugin. - * + * Called when a message is sent to plugin. + * * @param id The message id * @param data The message data + * @return Object to stop propagation or null */ - public void onMessage(String id, Object data) { + public Object onMessage(String id, Object data) { // If phone message if (id.equals("telephone")) { @@@ -177,7 -175,7 +174,6 @@@ /** * Release the audio player instance to save memory. - * - * * @param id The id of the audio player */ private boolean release(String id) { @@@ -192,7 -190,7 +188,6 @@@ /** * Start recording and save the specified file. - * - * * @param id The id of the audio player * @param file The name of the file */ @@@ -208,7 -206,7 +203,6 @@@ /** * Stop recording and save to the file specified when recording started. - * - * * @param id The id of the audio player */ public void stopRecordingAudio(String id) { @@@ -221,7 -219,7 +215,6 @@@ /** * Start or resume playing audio file. - * - * * @param id The id of the audio player * @param file The name of the audio file. */ @@@ -236,8 -234,8 +229,6 @@@ /** * Seek to a location. - * - * - * - * * @param id The id of the audio player * @param miliseconds int: number of milliseconds to skip 1000 = 1 second */ @@@ -250,7 -248,7 +241,6 @@@ /** * Pause playing. - * - * * @param id The id of the audio player */ public void pausePlayingAudio(String id) { @@@ -262,7 -260,7 +252,6 @@@ /** * Stop playing the audio file. - * - * * @param id The id of the audio player */ public void stopPlayingAudio(String id) { @@@ -276,7 -274,7 +265,6 @@@ /** * Get current position of playback. - * - * * @param id The id of the audio player * @return position in msec */ @@@ -290,7 -288,7 +278,6 @@@ /** * Get the duration of the audio file. - * - * * @param id The id of the audio player * @param file The name of the audio file. * @return The duration in msec. @@@ -313,12 -311,11 +300,12 @@@ /** * Set the audio device to be used for playback. - * + * * @param output 1=earpiece, 2=speaker */ + @SuppressWarnings("deprecation") public void setAudioOutputDevice(int output) { - AudioManager audiMgr = (AudioManager) this.ctx.getSystemService(Context.AUDIO_SERVICE); + AudioManager audiMgr = (AudioManager) this.ctx.getActivity().getSystemService(Context.AUDIO_SERVICE); if (output == 2) { audiMgr.setRouting(AudioManager.MODE_NORMAL, AudioManager.ROUTE_SPEAKER, AudioManager.ROUTE_ALL); } @@@ -332,12 -329,11 +319,12 @@@ /** * Get the audio device to be used for playback. - * + * * @return 1=earpiece, 2=speaker */ + @SuppressWarnings("deprecation") public int getAudioOutputDevice() { - AudioManager audiMgr = (AudioManager) this.ctx.getSystemService(Context.AUDIO_SERVICE); + AudioManager audiMgr = (AudioManager) this.ctx.getActivity().getSystemService(Context.AUDIO_SERVICE); if (audiMgr.getRouting(AudioManager.MODE_NORMAL) == AudioManager.ROUTE_EARPIECE) { return 1; } http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/AudioPlayer.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/AudioPlayer.java index 856cc7b,675161f..e975afa --- a/framework/src/org/apache/cordova/AudioPlayer.java +++ b/framework/src/org/apache/cordova/AudioPlayer.java @@@ -35,10 -35,10 +35,10 @@@ import java.io.IOException * This class implements the audio playback and recording capabilities used by Cordova. * It is called by the AudioHandler Cordova class. * Only one file can be played or recorded per class instance. - * + * * Local audio files must reside in one of two places: - * android_asset: file name must start with /android_asset/sound.mp3 - * sdcard: file name is just sound.mp3 + * android_asset: file name must start with /android_asset/sound.mp3 + * sdcard: file name is just sound.mp3 */ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, OnErrorListener { @@@ -63,18 -63,18 +63,18 @@@ private static int MEDIA_ERR_NETWORK = 2; private static int MEDIA_ERR_DECODE = 3; private static int MEDIA_ERR_NONE_SUPPORTED = 4; - - private AudioHandler handler; // The AudioHandler object - private String id; // The id of this player (used to identify Media object in JavaScript) - private int state = MEDIA_NONE; // State of recording or playback - private String audioFile = null; // File name to play or record to - private float duration = -1; // Duration of audio - - private MediaRecorder recorder = null; // Audio recording object - private String tempFile = null; // Temporary recording file name - - private MediaPlayer mPlayer = null; // Audio player object - private boolean prepareOnly = false; + + private AudioHandler handler; // The AudioHandler object + private String id; // The id of this player (used to identify Media object in JavaScript) + private int state = MEDIA_NONE; // State of recording or playback + private String audioFile = null; // File name to play or record to + private float duration = -1; // Duration of audio + + private MediaRecorder recorder = null; // Audio recording object + private String tempFile = null; // Temporary recording file name + + private MediaPlayer mPlayer = null; // Audio player object - private boolean prepareOnly = false; ++ private boolean prepareOnly = false; /** * Constructor. @@@ -88,15 -88,15 +88,14 @@@ if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { this.tempFile = Environment.getExternalStorageDirectory().getAbsolutePath() + "/tmprecording.mp3"; } else { -- this.tempFile = "/data/data/" + handler.ctx.getPackageName() + "/cache/tmprecording.mp3"; ++ this.tempFile = "/data/data/" + handler.ctx.getActivity().getPackageName() + "/cache/tmprecording.mp3"; } - } + } /** * Destroy player and stop audio playing or recording. */ public void destroy() { - - // Stop any play or record if (this.mPlayer != null) { if ((this.state == MEDIA_RUNNING) || (this.state == MEDIA_PAUSED)) { @@@ -123,7 -123,7 +122,6 @@@ Log.d(LOG_TAG, "AudioPlayer Error: Can't record in play mode."); this.handler.sendJavascript("cordova.require('cordova/plugin/Media').onStatus('" + this.id + "', "+MEDIA_ERROR+", { \"code\":"+MEDIA_ERR_ABORTED+"});"); } - - // Make sure we're not already recording else if (this.recorder == null) { this.audioFile = file; @@@ -159,14 -159,14 +157,14 @@@ /* this is a hack to save the file as the specified name */ File f = new File(this.tempFile); if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { - f.renameTo(new File(Environment.getExternalStorageDirectory().getAbsolutePath() + f.renameTo(new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + file)); } else { -- f.renameTo(new File("/data/data/" + handler.ctx.getPackageName() + "/cache/" + file)); ++ f.renameTo(new File("/data/data/" + handler.ctx.getActivity().getPackageName() + "/cache/" + file)); } - + } - + /** * Stop recording and save to the file specified when recording started. */ http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/BatteryListener.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/BatteryListener.java index 43d820b,22b1b94..bca9633 --- a/framework/src/org/apache/cordova/BatteryListener.java +++ b/framework/src/org/apache/cordova/BatteryListener.java @@@ -73,10 -74,10 +73,10 @@@ public class BatteryListener extends Pl updateBatteryInfo(intent); } }; - ctx.registerReceiver(this.receiver, intentFilter); + ctx.getActivity().registerReceiver(this.receiver, intentFilter); } - // Don't return any result now, since status results will be sent when events come in from broadcast receiver + // Don't return any result now, since status results will be sent when events come in from broadcast receiver PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT); pluginResult.setKeepCallback(true); return pluginResult; http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/CallbackServer.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/CallbackServer.java index f533722,a34ef3c..2eb292f --- a/framework/src/org/apache/cordova/CallbackServer.java +++ b/framework/src/org/apache/cordova/CallbackServer.java @@@ -104,15 -103,14 +104,14 @@@ public class CallbackServer implements /** * Init callback server and start XHR if running local app. - * - * ++ * * If Cordova app is loaded from file://, then we can use XHR * otherwise we have to use polling due to cross-domain security restrictions. - * + * * @param url The URL of the Cordova app being loaded */ - @SuppressWarnings("deprecation") public void init(String url) { - //Log.d(LOG_TAG, "CallbackServer.start("+url+")"); + //System.out.println("CallbackServer.start("+url+")"); this.active = false; this.empty = true; this.port = 0; @@@ -145,7 -143,7 +144,6 @@@ /** * Return if polling is being used instead of XHR. - * - * * @return */ public boolean usePolling() { @@@ -154,7 -152,7 +152,6 @@@ /** * Get the port that this server is running on. - * - * * @return */ public int getPort() { @@@ -163,7 -161,7 +160,6 @@@ /** * Get the security token that this server requires when calling getJavascript(). - * - * * @return */ public String getToken() { http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/CameraLauncher.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/CameraLauncher.java index d1156e0,cba7e49..436c232 --- a/framework/src/org/apache/cordova/CameraLauncher.java +++ b/framework/src/org/apache/cordova/CameraLauncher.java @@@ -89,17 -84,9 +89,17 @@@ public class CameraLauncher extends Plu public CameraLauncher() { } +// public void setContext(CordovaInterface mCtx) { +// super.setContext(mCtx); +// if (CordovaInterface.class.isInstance(mCtx)) +// cordova = (CordovaInterface) mCtx; +// else +// LOG.d(LOG_TAG, "ERROR: You must use the CordovaInterface for this to work correctly. Please implement it in your activity"); +// } + /** * Executes the request and returns PluginResult. - * + * * @param action The action to execute. * @param args JSONArry of arguments for the plugin. * @param callbackId The callback id used when calling back into JavaScript. @@@ -291,21 -272,21 +291,20 @@@ public void onActivityResult(int requestCode, int resultCode, Intent intent) { // Get src and dest types from request code - int srcType = (requestCode/16) - 1; + int srcType = (requestCode / 16) - 1; int destType = (requestCode % 16) - 1; - int rotate = 0; - - // Create an ExifHelper to save the exif data that is lost during compression - ExifHelper exif = new ExifHelper(); - try { - if (this.encodingType == JPEG) { - exif.createInFile(DirectoryManager.getTempDirectoryPath(ctx.getContext()) + "/Pic.jpg"); - exif.readExifData(); - } - } catch (IOException e) { - e.printStackTrace(); - } + int rotate = 0; + // Create an ExifHelper to save the exif data that is lost during compression + ExifHelper exif = new ExifHelper(); + try { + if (this.encodingType == JPEG) { + exif.createInFile(DirectoryManager.getTempDirectoryPath(this.ctx.getActivity()) + "/Pic.jpg"); + exif.readExifData(); + } + } catch (IOException e) { + e.printStackTrace(); + } - // If CAMERA if (srcType == CAMERA) { // If image available @@@ -401,21 -382,21 +400,21 @@@ if (destType == DATA_URL) { try { Bitmap bitmap = android.graphics.BitmapFactory.decodeStream(resolver.openInputStream(uri)); - String[] cols = { MediaStore.Images.Media.ORIENTATION }; - Cursor cursor = this.ctx.getContentResolver().query(intent.getData(), - cols, - null, null, null); - if (cursor != null) { - cursor.moveToPosition(0); - rotate = cursor.getInt(0); - cursor.close(); - } - if (rotate != 0) { - Matrix matrix = new Matrix(); - matrix.setRotate(rotate); - bitmap = bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); - } - bitmap = scaleBitmap(bitmap); + String[] cols = { MediaStore.Images.Media.ORIENTATION }; + Cursor cursor = this.ctx.getActivity().getContentResolver().query(intent.getData(), + cols, + null, null, null); + if (cursor != null) { + cursor.moveToPosition(0); + rotate = cursor.getInt(0); + cursor.close(); + } + if (rotate != 0) { + Matrix matrix = new Matrix(); + matrix.setRotate(rotate); + bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); + } - bitmap = scaleBitmap(bitmap); ++ bitmap = scaleBitmap(bitmap); this.processPicture(bitmap); bitmap.recycle(); bitmap = null; http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/Capture.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/Capture.java index 1653d35,adf7059..c6f8202 --- a/framework/src/org/apache/cordova/Capture.java +++ b/framework/src/org/apache/cordova/Capture.java @@@ -51,27 -52,17 +51,27 @@@ public class Capture extends Plugin private static final String LOG_TAG = "Capture"; private static final int CAPTURE_INTERNAL_ERR = 0; - private static final int CAPTURE_APPLICATION_BUSY = 1; - private static final int CAPTURE_INVALID_ARGUMENT = 2; +// private static final int CAPTURE_APPLICATION_BUSY = 1; +// private static final int CAPTURE_INVALID_ARGUMENT = 2; private static final int CAPTURE_NO_MEDIA_FILES = 3; - // private static final int CAPTURE_NOT_SUPPORTED = 20; + private static final int CAPTURE_NOT_SUPPORTED = 20; private String callbackId; // The ID of the callback to be invoked with our result private long limit; // the number of pics/vids/clips to take private double duration; // optional duration parameter for video recording private JSONArray results; // The array of results to be returned to the user - private Uri imageUri; // Uri of captured image + private Uri imageUri; // Uri of captured image + //private CordovaInterface cordova; + +// public void setContext(Context mCtx) +// { +// if (CordovaInterface.class.isInstance(mCtx)) +// cordova = (CordovaInterface) mCtx; +// else +// LOG.d(LOG_TAG, "ERROR: You must use the CordovaInterface for this to work correctly. Please implement it in your activity"); +// } + @Override public PluginResult execute(String action, JSONArray args, String callbackId) { this.callbackId = callbackId; @@@ -349,12 -342,12 +349,12 @@@ /** * Creates a JSONObject that represents a File from the Uri - * + * * @param data the Uri of the audio/image/video * @return a JSONObject that represents a File - * @throws IOException + * @throws IOException */ - private JSONObject createMediaFile(Uri data){ + private JSONObject createMediaFile(Uri data) { File fp = new File(FileUtils.getRealPathFromURI(data, this.ctx)); JSONObject obj = new JSONObject(); http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/CompassListener.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/CompassListener.java index e9fbcac,8615157..d6e54a7 --- a/framework/src/org/apache/cordova/CompassListener.java +++ b/framework/src/org/apache/cordova/CompassListener.java @@@ -212,8 -212,9 +212,8 @@@ public class CompassListener extends Pl this.setStatus(CompassListener.STOPPED); } - public void onAccuracyChanged(Sensor sensor, int accuracy) { - // TODO Auto-generated method stub + // TODO Auto-generated method stub } /** http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/81195db8/framework/src/org/apache/cordova/ContactAccessor.java ---------------------------------------------------------------------- diff --cc framework/src/org/apache/cordova/ContactAccessor.java index f4ceed1,b8ac636..44bed23 --- a/framework/src/org/apache/cordova/ContactAccessor.java +++ b/framework/src/org/apache/cordova/ContactAccessor.java @@@ -148,10 -147,10 +148,10 @@@ public abstract class ContactAccessor value = null; } } - } + } catch (JSONException e) { Log.d(LOG_TAG, "Could not get = " + e.getMessage()); - } + } return value; }