szanata / PhoneStateChangeListener

Cordova plugin to provide callback when Telephony state changes
8 stars 4 forks source link

Adaptation to Phonegap 3.0 #3

Open afressancourt opened 11 years ago

afressancourt commented 11 years ago

Hello,

I have been trying to use your plugin with Phonegap 3.0; and it happens that the code needs to be a bit modified in order for it to work properly.

In the .java file, in order for the plugin to work on the 3.0 version, you should replace:

import org.apache.cordova.api.CallbackContext;
import org.apache.cordova.api.CordovaPlugin;

By:

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;

Besides, in order to use the plugin properly, you should declare it in the res/xml/config.xml using the following syntax:

<feature name="PhoneStateChangeListener">
        <param name="android-package" value="com.szanata.cordova.plugins.PhoneStateChangeListener" />
</feature>

I managed to make it work relatively properly this way (my question in another topic)

Antoine

szanata commented 10 years ago

Will make the changes, thanks