diff --git a/README.md b/README.md index 9e1fe102..813633ef 100755 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Start adb logcat (console.log calls output here): Creating a new Cordova Android Project --- - ./bin/create ~/Desktop/myapp com.phonegap.special MyApp + ./bin/create ~/Desktop/myapp com.myapp.special MyApp Importing a Cordova Android Project into Eclipse ---- @@ -105,5 +105,5 @@ Further Reading --- - [http://developer.android.com](http://developer.android.com) -- [http://docs.phonegap.com](http://docs.phonegap.com) -- [http://wiki.phonegap.com](http://wiki.phonegap.com) +- [http://incubator.apache.org/cordova/](http://incubator.apache.org/cordova/) +- [http://wiki.apache.org/cordova/](http://wiki.apache.org/cordova/) diff --git a/framework/src/com/phonegap/api/IPlugin.java b/framework/src/com/phonegap/api/IPlugin.java deleted file mode 100755 index 2b8979bc..00000000 --- a/framework/src/com/phonegap/api/IPlugin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package com.phonegap.api; - -/** - * Plugin interface must be implemented by any plugin classes. - * - * The execute method is called by the PluginManager. - */ -public interface IPlugin extends org.apache.cordova.api.IPlugin { -} diff --git a/framework/src/com/phonegap/api/LOG.java b/framework/src/com/phonegap/api/LOG.java deleted file mode 100755 index e9a37d2e..00000000 --- a/framework/src/com/phonegap/api/LOG.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package com.phonegap.api; - -/** - * Log to Android logging system. - * - * Log message can be a string or a printf formatted string with arguments. - * See http://developer.android.com/reference/java/util/Formatter.html - */ -public class LOG extends org.apache.cordova.api.LOG { -} diff --git a/framework/src/com/phonegap/api/PhonegapActivity.java b/framework/src/com/phonegap/api/PhonegapActivity.java deleted file mode 100755 index c1b7c46e..00000000 --- a/framework/src/com/phonegap/api/PhonegapActivity.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package com.phonegap.api; - -import android.app.Activity; - -/** - * The Cordova activity abstract class that is extended by DroidGap. - * It is used to isolate plugin development, and remove dependency on entire Cordova library. - */ -public abstract class PhonegapActivity extends Activity implements org.apache.cordova.api.CordovaInterface { -} diff --git a/framework/src/com/phonegap/api/Plugin.java b/framework/src/com/phonegap/api/Plugin.java deleted file mode 100755 index 05f32b7c..00000000 --- a/framework/src/com/phonegap/api/Plugin.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package com.phonegap.api; - -/** - * Plugin interface must be implemented by any plugin classes. - * - * The execute method is called by the PluginManager. - */ -public abstract class Plugin extends org.apache.cordova.api.Plugin { -} diff --git a/framework/src/com/phonegap/api/PluginManager.java b/framework/src/com/phonegap/api/PluginManager.java deleted file mode 100755 index 0497e7d6..00000000 --- a/framework/src/com/phonegap/api/PluginManager.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package com.phonegap.api; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.api.CordovaInterface; - -import android.webkit.WebView; - -/** - * PluginManager is exposed to JavaScript in the Cordova WebView. - * - * Calling native plugin code can be done by calling PluginManager.exec(...) - * from JavaScript. - */ -public class PluginManager extends org.apache.cordova.api.PluginManager { - - public PluginManager(WebView app, CordovaInterface ctx) throws Exception { - super((CordovaWebView) app, ctx); - } -} diff --git a/framework/src/com/phonegap/api/PluginResult.java b/framework/src/com/phonegap/api/PluginResult.java deleted file mode 100755 index 8649135e..00000000 --- a/framework/src/com/phonegap/api/PluginResult.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package com.phonegap.api; - -import org.json.JSONArray; -import org.json.JSONObject; - -public class PluginResult extends org.apache.cordova.api.PluginResult { - - public PluginResult(Status status) { - super(status); - } - - public PluginResult(Status status, String message) { - super(status, message); - } - - public PluginResult(Status status, JSONArray message) { - super(status, message); - } - - public PluginResult(Status status, JSONObject message) { - super(status, message); - } - - public PluginResult(Status status, int i) { - super(status, i); - } - - public PluginResult(Status status, float f) { - super(status, f); - } - - public PluginResult(Status status, boolean b) { - super(status, b); - } -} diff --git a/test/.project b/test/.project index 8f21f7f7..7bacb6f0 100644 --- a/test/.project +++ b/test/.project @@ -1,6 +1,6 @@ - PhoneGapViewTestActivity + CordovaViewTestActivity diff --git a/test/res/layout/main.xml b/test/res/layout/main.xml index 45e2d063..9b002ab3 100644 --- a/test/res/layout/main.xml +++ b/test/res/layout/main.xml @@ -23,7 +23,7 @@ android:orientation="vertical" > diff --git a/test/src/org/apache/cordova/test/ActivityPlugin.java b/test/src/org/apache/cordova/test/ActivityPlugin.java index 553ef2ae..805454ab 100755 --- a/test/src/org/apache/cordova/test/ActivityPlugin.java +++ b/test/src/org/apache/cordova/test/ActivityPlugin.java @@ -24,8 +24,8 @@ import org.json.JSONException; import android.content.Intent; -import com.phonegap.api.Plugin; -import com.phonegap.api.PluginResult; +import org.apache.cordova.api.Plugin; +import org.apache.cordova.api.PluginResult; /** * This class provides a service. diff --git a/test/src/org/apache/cordova/test/CordovaActivityTest.java b/test/src/org/apache/cordova/test/CordovaActivityTest.java index 766dd530..daa0271e 100644 --- a/test/src/org/apache/cordova/test/CordovaActivityTest.java +++ b/test/src/org/apache/cordova/test/CordovaActivityTest.java @@ -20,7 +20,7 @@ package org.apache.cordova.test; import org.apache.cordova.CordovaWebView; -import com.phonegap.api.PluginManager; +import org.apache.cordova.api.PluginManager; import android.app.Instrumentation; import android.test.ActivityInstrumentationTestCase2; diff --git a/test/src/org/apache/cordova/test/CordovaTest.java b/test/src/org/apache/cordova/test/CordovaTest.java index 4a247926..64cd036b 100644 --- a/test/src/org/apache/cordova/test/CordovaTest.java +++ b/test/src/org/apache/cordova/test/CordovaTest.java @@ -19,7 +19,7 @@ package org.apache.cordova.test; import org.apache.cordova.CordovaWebView; -import com.phonegap.api.PluginManager; +import org.apache.cordova.api.PluginManager; import android.app.Instrumentation; import android.test.ActivityInstrumentationTestCase2; @@ -34,13 +34,13 @@ public class CordovaTest extends private String rString; public CordovaTest() { - super("com.phonegap.test.activities", CordovaWebViewTestActivity.class); + super("org.apache.cordova.test.activities", CordovaWebViewTestActivity.class); } protected void setUp() throws Exception { super.setUp(); testActivity = this.getActivity(); - testView = testActivity.findViewById(R.id.phoneGapView); + testView = testActivity.findViewById(R.id.cordovaWebView); } public void testPreconditions() { diff --git a/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java b/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java index d25caa50..b1111432 100644 --- a/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java +++ b/test/src/org/apache/cordova/test/CordovaWebViewTestActivity.java @@ -30,7 +30,7 @@ import android.os.Bundle; public class CordovaWebViewTestActivity extends Activity implements CordovaInterface { - CordovaWebView phoneGap; + CordovaWebView cordovaWebView; /** Called when the activity is first created. */ @Override @@ -39,17 +39,17 @@ public class CordovaWebViewTestActivity extends Activity implements CordovaInter setContentView(R.layout.main); - phoneGap = (CordovaWebView) findViewById(R.id.phoneGapView); + cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView); - phoneGap.loadUrl("file:///android_asset/www/index.html"); + cordovaWebView.loadUrl("file:///android_asset/www/index.html"); } public void onDestroy() { super.onDestroy(); - if (phoneGap.pluginManager != null) { - phoneGap.pluginManager.onDestroy(); + if (cordovaWebView.pluginManager != null) { + cordovaWebView.pluginManager.onDestroy(); } } diff --git a/test/src/org/apache/cordova/test/GapClientTest.java b/test/src/org/apache/cordova/test/GapClientTest.java index bfee8638..512c9a2a 100644 --- a/test/src/org/apache/cordova/test/GapClientTest.java +++ b/test/src/org/apache/cordova/test/GapClientTest.java @@ -41,7 +41,7 @@ public class GapClientTest extends ActivityInstrumentationTestCase2