Permalink
Browse files

updating for 1.4.0

  • Loading branch information...
1 parent b81151f commit 4ad8cc907ad87f00859b1101eb7e7a4dba7f3780 stevengill committed Jan 31, 2012
Showing 994 changed files with 15,832 additions and 177,808 deletions.
View
@@ -1,82 +0,0 @@
-PhoneGap implementation for Google Android
-==========================================
-
-
-Install SDK + PhoneGap
-----------------------
-1. Download and install Eclipse Classic
-2. Download and install Android SDK
-3. Download and install ADT Plugin
-4. Download the latest copy of PhoneGap and extract its contents. We will be working with the Android directory.
-
-
-Setup New Project
------------------
-1. Launch Eclipse, then under the File menu select New > Android Project
-2. In the root directory of the project, create two new directories:
- - /libs
- - /assets/www
-3. Copy phonegap-1.3.0.js from your PhoneGap download earlier to /assets/www
-4. Copy phonegap-1.3.0.jar from your PhoneGap download earlier to /libs
-5. Copy xml folder from your PhoneGap download earlier to /res
-6. Make a few adjustments too the project's main Java file found in the src folder in Eclipse:
- - Change the class's extend from Activity to DroidGap
- - Replace the setContentView() line with super.loadUrl("file:///android_asset/www/index.html");
- - Add import com.phonegap.*;
- - Remove import android.app.Activity;
-You might experience an error here, where Eclipse can't find phonegap-1.3.0.jar. In this case, right click on the /libs folder and go to Build Paths/ > Configure Build Paths. Then, in the Libraries tab, add phonegap-1.3.0.jar to the Project. If Eclipse is being temperamental, you might need to refresh (F5) the project once again.
-
-7. Right click on AndroidManifest.xml and select Open With > Text Editor
-8. Paste the following permissions under versionName:
-
- <supports-screens
- android:largeScreens="true"
- android:normalScreens="true"
- android:smallScreens="true"
- android:resizeable="true"
- android:anyDensity="true"
- />
- <uses-permission android:name="android.permission.CAMERA" />
- <uses-permission android:name="android.permission.VIBRATE" />
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.RECEIVE_SMS" />
- <uses-permission android:name="android.permission.RECORD_AUDIO" />
- <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
- <uses-permission android:name="android.permission.READ_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-
-9. Add android:configChanges="orientation|keyboardHidden" to the activity tag in AndroidManifest.
-
-10. Add a second activity under you appliction tag in AndroidManifest.
-<activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden"> <intent-filter> </intent-filter> </activity>
-
-11. Now create and open a new file named index.html in the /assets/www directory. Paste the following code:
-
- <!DOCTYPE HTML>
- <html>
- <head>
- <title>PhoneGap</title>
- <script type="text/javascript" charset="utf-8" src="phonegap-1.0.0.js"></script>
- </head>
- <body>
- <h1>Hello World</h1>
- </body>
- </html>
-
-12. A. Deploy to Simulator
- - Right click the project and go to <strong>Run As</strong> and click <strong>Android Application</strong></li>
- - Eclipse will ask you to select an appropriate AVD. If there isn't one, then you'll need to create it.</li>
-
-
-13. B. Deploy to Device
- - Make sure USB debugging is enabled on your device and plug it into your system. (Settings > Applications > Development)
- - Right click the project and go to Run As and click Android Application
-
-14. Done!
- - You can also checkout more detailed version of this guide http://PhoneGap.com/start
Binary file not shown.
Binary file not shown.
View
@@ -1,2 +0,0 @@
-1.3.0
-
@@ -1,53 +0,0 @@
-/*
- * Accelerometer.h
- *
- * Created on: Mar 8, 2011
- * Author: Anis Kadri
- *
- * 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.
- */
-
-#ifndef ACCELEROMETER_H_
-#define ACCELEROMETER_H_
-
-#include "PhoneGapCommand.h"
-#include <FUix.h>
-
-using namespace Osp::Uix;
-
-class Accelerometer: public PhoneGapCommand, ISensorEventListener
- {
-public:
- Accelerometer();
- Accelerometer(Web* pWeb);
- virtual ~Accelerometer();
-public:
- virtual void Run(const String& command);
- bool StartSensor(void);
- bool StopSensor(void);
- bool IsStarted(void);
- void GetLastAcceleration(void);
- void OnDataReceived(SensorType sensorType, SensorData& sensorData, result r);
-private:
- SensorManager __sensorMgr;
- bool started;
- String callbackId;
- float x, y, z;
- long timestamp;
-};
-
-#endif /* ACCELEROMETER_H_ */
View
@@ -1,51 +0,0 @@
-/*
- * Compass.h
- *
- * Created on: Mar 25, 2011
- * Author: Anis Kadri
- *
- * 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.
- */
-
-#ifndef COMPASS_H_
-#define COMPASS_H_
-
-#include <FUix.h>
-#include "PhoneGapCommand.h"
-
-using namespace Osp::Uix;
-
-class Compass: public PhoneGapCommand, ISensorEventListener {
-public:
- Compass(Web* pWeb);
- virtual ~Compass();
-public:
- void Run(const String& command);
- bool StartSensor(void);
- bool StopSensor(void);
- bool IsStarted(void);
- void GetLastHeading(void);
- void OnDataReceived(SensorType sensorType, SensorData& sensorData, result r);
-private:
- SensorManager __sensorMgr;
- bool started;
- String callbackId;
- float x, y, z;
- long timestamp;
-};
-
-#endif /* COMPASS_H_ */
@@ -1,40 +0,0 @@
-/*
- * DebugConsole.h
- *
- * Created on: Mar 24, 2011
- * Author: Anis Kadri
- *
- * 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.
- */
-
-#ifndef DEBUGCONSOLE_H_
-#define DEBUGCONSOLE_H_
-
-#include "PhoneGapCommand.h"
-
-class DebugConsole: public PhoneGapCommand {
-public:
- DebugConsole(Web* pWeb);
- virtual ~DebugConsole();
-public:
- void Run(const String& command);
-private:
- void CleanUp(String& str);
- void Log(String& statement, String& logLevel);
-};
-
-#endif /* DEBUGCONSOLE_H_ */
View
@@ -1,42 +0,0 @@
-/*
- * Device.h
- *
- * Created on: Mar 8, 2011
- * Author: Anis Kadri
- *
- * 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.
- */
-
-#ifndef DEVICE_H_
-#define DEVICE_H_
-
-#include "PhoneGapCommand.h"
-#include <FSystem.h>
-
-using namespace Osp::System;
-
-class Device: public PhoneGapCommand {
-public:
- Device();
- Device(Web* pWeb);
- virtual ~Device();
-public:
- result SetDeviceInfo();
- virtual void Run(const String& command);
-};
-
-#endif /* DEVICE_H_ */
@@ -1,51 +0,0 @@
-/*
- * GeoLocation.h
- *
- * Created on: Mar 7, 2011
- * Author: Anis Kadri
- *
- * 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.
- */
-
-#ifndef GEOLOCATION_H_
-#define GEOLOCATION_H_
-
-#include "PhoneGapCommand.h"
-#include <FLocations.h>
-
-using namespace Osp::Locations;
-
-class GeoLocation: public PhoneGapCommand, ILocationListener {
-private:
- LocationProvider* locProvider;
- bool watching;
- String callbackId;
-public:
- GeoLocation();
- GeoLocation(Web* pWeb);
- virtual ~GeoLocation();
-public:
- void StartWatching();
- void StopWatching();
- bool IsWatching();
- void GetLastKnownLocation();
- virtual void OnLocationUpdated(Location& location);
- virtual void OnProviderStateChanged(LocProviderState newState);
- virtual void Run(const String& command);
-};
-
-#endif /* GEOLOCATION_H_ */
View
@@ -1,47 +0,0 @@
-/*
- * Kamera.h
- *
- * Created on: Apr 19, 2011
- * Author: Anis Kadri
- *
- * 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.
- */
-
-#ifndef KAMERA_H_
-#define KAMERA_H_
-
-#include "PhoneGapCommand.h"
-#include <FApp.h>
-#include <FIo.h>
-
-using namespace Osp::App;
-using namespace Osp::Base::Collection;
-using namespace Osp::Io;
-
-class Kamera: public PhoneGapCommand, IAppControlEventListener {
-public:
- Kamera(Web* pWeb);
- virtual ~Kamera();
-public:
- String callbackId;
-public:
- void Run(const String& command);
- void GetPicture();
- void OnAppControlCompleted (const String &appControlId, const String &operationId, const IList *pResultList);
-};
-
-#endif /* KAMERA_H_ */
Oops, something went wrong.

0 comments on commit 4ad8cc9

Please sign in to comment.