Talk (2)


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Talk (2)

  2. 2. NATIVE PLATFORM There are many platforms available for developing mobile applications. It’s a tedious job for the developer to code a application/idea on all platform. Each platform has its own native api which are used for developing applications. Some of the Mobile Platforms: Symbian Android IOS Blackberry Web OS Windows Phone Bada Meego
  3. 3. SOLUTION??? X Platform
  4. 4. CROSS PLATFORM???<html> .. .. Compiler ..<html>Definition:-A cross mobile platform is a platform thathelps developer to develop the applications in onecommon language that would be supported by all thepopular platform.One piece of code compiled on different platforms.
  5. 5. FEATURESFree and open sourceCreate apps with jquery mobile or HTML, CSS & JSReduce development and long-term maintenance costReduce technical barriers and the number of requiredskills for the development teamSingle code for building mobile apps for iPhone, Androidand other platformSupports all major mobile platforms.
  6. 6. STRATEGY Utilize open source technologies Write code once and cross-compile on multiple mobile platforms Reduce the number of skills for development team DESIGNUse single codebase for different versions ofapplications on different platformsProvide same functionality to all platformsCross browser compatibility
  7. 7. DEVELOPMENT• Create native mobile apps for multiple devices & operating systems.• Access to native APIs using Phonegap.• Build apps using HTML, Javascript and CSS. PROMOTION• Publish apps for iOS, Android, Blackberry etc.• Service customers in a variety of marketplaces.
  8. 8. PHONEGAP???• An open source Platform which makes use of web technologies like jquery mobile,html5,css, and javascript to create native apps.• A Native library for every platform.• A javaScript ibrary/wrapper.• Currently known as Apache Cordova
  9. 9. API’S SUPPORTED!!!
  10. 10. PHONEGAP HISTORY!!!• First developed at an iPhoneDevCamp event in San Francisco• IOS running out of Iphone Developer.• There are lots more web developers out there than there are Objective-C ones.• Need to develop a framework that allowed web developers to leverage all their knowledge of HTML, CSS, and JavaScript that could also interact with the important native parts of an iPhone.
  11. 11. PLATFORM SUPPORT • IOS • Android • Symbian • Blackberry • Windows Phone • Web OS • Bada • Tizen
  13. 13. 1. RequirementsEclipse 3.4+2. Install SDK + CordovaDownload and install Eclipse ClassicDownload and install Android SDKDownload and install ADT PluginDownload the latest copy of Cordova and extract itscontents.
  14. 14. 3. Setup New ProjectLaunch Eclipse, and select menu item New Project
  15. 15. Then specify an Application Name, a Project Name andPackage Name with Namespace
  16. 16. Then select a graphic
  17. 17. Then Create a Blank Activity
  18. 18. Make sure the activity doesnt inherit fromanything. You most likely wont have PhoneGap onyour Eclipse Workspace. Once this is done, clickfinishIn the root directory of your project, create twonew directories:/libsassets/wwwCopy cordova-2.0.0.js from your Cordovadownload earlier to assets/www
  19. 19. Copy cordova-2.0.0.jar from your Cordovadownload earlier to /libsCopy xml folder from your Cordovadownload earlier to /res
  20. 20. Verify that cordova-2.0.0.jar is listed in the BuildPath for your project.
  21. 21. Edit your projects main Java file found in the src folder inEclipse:Add import org.apache.cordova.*;Change the classs extend from Activity to DroidGapReplace the setContentView() line withsuper.loadUrl("file:///android_asset/www/index.html");
  22. 22. •Right click on AndroidManifest.xml and select OpenWith > Text Editor•Paste the following permissions between the <uses-sdk.../> and <application.../> tags. <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizeable="true" android:anyDensity="true" /> <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" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" />
  23. 23. 4. Hello World•Create and open a new file named index.html in theassets/www directory. Paste the following code:<!DOCTYPE HTML><html><head><title>Cordova</title><script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script></head><body><h1>Hello World</h1></body></html>
  24. 24. 5A. Deploy to SimulatorRight click the project and go to Run As > Android ApplicationEclipse will ask you to select an appropriate AVD. If there isntone, then youll need to create it.5B. Deploy to DeviceMake sure USB debugging is enabled on your device and plugit into your system. (Settings > Applications > Development)Right click the project and go to Run As > Android Application
  25. 25. HURRAYI Developed My 1 st Android App without learning Andoid!!!!