Note that there are some explanatory texts on larger screens.

plurals
  1. POPhonegap - Upgrade to 3.0 problems with API features
    primarykey
    data
    text
    <p>Working on Windows with Phonegap 3.0, Android platform, debugging in Eclipse. </p> <p>I was able to get my old app to compile but I have encountered a new problem when I try to use a feature that is now a plugin.</p> <p>I have added all the plugins I need through the CLI tool and have added the "feature" data to the config.xml file, so I assume that they are available to be called. The permissions are also set in the manifest file.</p> <p>FileTransfer</p> <p>I see that the File Transfer API example code has not changed for 3.0, so I left the call the same in my code. So the file will download but then I get an error that makes my app crash</p> <pre><code>" D/CordovaLog(12883): file:///android_asset/www/phonegap.js: Line 932 : Uncaught Error: Error calling method on NPObject! " </code></pre> <p>I did some searching for this error and there doesn't seem to be a standard solution?</p> <p>Perhaps there is a new way to call features that are within plugins? Because I can't play an audio file without getting errors as well. The sound file will play but will cause errors. </p> <pre><code>" 09-01 20:13:17.274: W/PluginManager(13279): THREAD WARNING: exec() call to Media.startPlayingAudio blocked the main thread for 23ms. Plugin should use CordovaInterface.getThreadPool(). " </code></pre> <p>I have re-read the media API and there is no mention of a thread pool. I am doing all of my programming in javascript.</p> <p>Essentially where ever I use a plugin feature the app has major errors. I tried using my record sound feature in my previously working app, and when I call a stop to my recording it throws an error</p> <pre><code>" 09-01 20:10:04.206: E/AudioPlayer(13279): FAILED renaming /mnt/sdcard/tmprecording.3gp to /sdsub/myapp/Recorded/myRecording.amr " </code></pre> <p>I tested the file transfer api again through my file remove function and it also failed</p> <pre><code>" 09-01 20:16:00.884: W/PluginManager(13279): THREAD WARNING: exec() call to File.remove blocked the main thread for 19ms. Plugin should use CordovaInterface.getThreadPool(). " </code></pre> <p>it seems like the essential nature of how features work has changed but is not documented anywhere. The API calls seem unchanged from older versions, just how you install the API features is different, but I followed that guide and installed them. </p> <p>Is there a new API guide that I have missed? because the Phonegap API documentation hasn't changed for how these features are called in 3.0. </p> <p>Thanks. </p> <p>my config file</p> <pre><code>&lt;feature name="App"&gt; &lt;param name="android-package" value="org.apache.cordova.App" /&gt; &lt;/feature&gt; &lt;feature name="NetworkStatus"&gt; &lt;param name="android-package" value="org.apache.cordova.networkinformation.NetworkManager" /&gt; &lt;/feature&gt; &lt;feature name="File"&gt; &lt;param name="android-package" value="org.apache.cordova.file.FileUtils" /&gt; &lt;/feature&gt; &lt;feature name="FileTransfer"&gt; &lt;param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" /&gt; &lt;/feature&gt; &lt;feature name="Media"&gt; &lt;param name="android-package" value="org.apache.cordova.media.AudioHandler" /&gt; &lt;/feature&gt; &lt;feature name="Notification"&gt; &lt;param name="android-package" value="org.apache.cordova.dialogs.Notification" /&gt; &lt;/feature&gt; &lt;feature name="SplashScreen"&gt; &lt;param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" /&gt; &lt;/feature&gt; &lt;feature name="Compass"&gt; &lt;param name="android-package" value="org.apache.cordova.deviceorientation.CompassListener" /&gt; &lt;/feature&gt; </code></pre> <p>my Manifest file</p> <pre><code>&lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt; &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt; &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload