Skip to content

Commit

Permalink
Merge pull request #2 from stather/master
Browse files Browse the repository at this point in the history
Now works as cordova plugin with cordova command line
  • Loading branch information
macdonst committed Oct 20, 2013
2 parents 8a6c370 + d6f9e5d commit 2f4c042
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
/nbproject/private/
7 changes: 7 additions & 0 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config.folder=${file.reference.TelephoneNumberPlugin-config}
file.reference.TelephoneNumberPlugin-config=config
file.reference.TelephoneNumberPlugin-test=test
file.reference.TelephoneNumberPlugin-www=www
files.encoding=UTF-8
site.root.folder=${file.reference.TelephoneNumberPlugin-www}
test.folder=${file.reference.TelephoneNumberPlugin-test}
9 changes: 9 additions & 0 deletions nbproject/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>TelephoneNumberPlugin</name>
</data>
</configuration>
</project>
34 changes: 34 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.simonmacdonald.telephonenumber"
version="1.0.0">
<engines>
<engine name="cordova-android" version=">=3.0.0"/>
</engines>

<name>TelephoneNumber</name>
<description>This plugin allows your to get hold of the telephone number from an android device</description>
<author>Simon MacDonald, updated to Cordova 3 by Russell Stather</author>
<keywords>android, phone number</keywords>
<license>MIT</license>
<asset src="www/telephonenumber.js" target="telephonenumber.js" />

<platform name="android">
<source-file src="src/com/simonmacdonald/cordova/plugins/TelephoneNumber.java" target-dir="src/com/simonmacdonald/cordova/plugins" />
<config-file target="res/xml/config.xml" parent="/*">
<feature name="TelephoneNumber" >
<param name="android-package" value="com.simonmacdonald.cordova.plugins.TelephoneNumber"/>
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
</config-file>


</platform>

</plugin>

6 changes: 3 additions & 3 deletions src/com/simonmacdonald/cordova/plugins/TelephoneNumber.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.simonmacdonald.cordova.plugins;

import org.apache.cordova.api.CallbackContext;
import org.apache.cordova.api.CordovaPlugin;
import org.apache.cordova.api.PluginResult;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.PluginResult;
import org.json.JSONArray;

import android.content.Context;
Expand Down

0 comments on commit 2f4c042

Please sign in to comment.