Posts

Showing posts from March, 2013

Getting Started PhoneGap with Android

Image
This guide describes how to set up your development environment for Cordova and run a sample application. Note that Cordova used to be called PhoneGap, so some of the sites still use the old PhoneGap name. 1. Requirements Eclipse 3.4+ 2. Install SDK + Cordova Download and install Eclipse Classic Download and install Android SDK Download and install ADT Plugin Download the latest copy of [ PhoneGap and extract its contents. We will be working with the Android directory. 3. Setup New Project Launch Eclipse, and select menu item New > Android Project . Fill out the three panels of the New Android Project wizard shown below. In the root directory of your project, create two new directories: /libs assets/www Copy cordova-1.8.0.js from your Cordova download earlier to assets/www Copy cordova-1.8.0.jar from your Cordova download earlier to /libs Copy xml folder from your Cordova download earlier to /res Verify that cordova-1.8.0.jar

PhoneGap with native plugins for Android

Image
Requirements Prerequisite knowledge A good understanding of the fundamentals of PhoneGap and programming in Objective-C is required to make the most of this article. User level Intermediate Sample files myfirstphonegapplugin_a.zip This article examines native plugins for PhoneGap (also known as Apache Cordova) applications in Eclipse, targeting Android devices. If you are just starting out with PhoneGap or if you need to review the fundamentals of PhoneGap, read Getting started with PhoneGap in Eclipse for Android before continuing. The terms Cordova and PhoneGap are used interchangeably within this article to refer to the same open source application platform that lets you create natively-installed mobile applications using HTML and JavaScript. The PhoneGap codebase moved to open source at Apache Software Foundation under the name Cordova. Adobe is

PhoneGap in Eclipse for Android

Image
Requirements Note : Be sure to change the version number of the Cordova JavaScript file to match the version of PhoneGap/Cordova that you are using. Eclipse is an open source integrated development environment (IDE) that supports many technologies, but this article is focused on its support of Java, the native language for Android applications. Android is Google's open source mobile operating system. Android is the operating system for many smartphone and tablet devices, including the Samsung Galaxy line of phones and tablets, the Amazon Kindle Fire tablet, and the Barnes and Noble Nook tablet, as well as many other devices from numerous manufacturers. PhoneGap is an open source application platform that enables you to create natively-installed mobile applications using HTML and JavaScript. Setting up Eclipse The first step in setting up your development environment for PhoneGap application

Phonegap, Sencha Touch, Rhomobile, MoSync Reload Supported Device APIs

Phonegap PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms such as Android, BlackBerry, iOS, Symbian, WebOS, Windows Phone 7, Windows Phone 8, Windows 8, Bada, Tizen. Sencha Touch Sencha Touch, a high-performance HTML5 mobile application framework, is the cornerstone of the Sencha HTML5 platform. Built for enabling world-class user experiences, Sencha Touch is the only framework that enables developers to build fast and impressive apps that work on iOS, Android, BlackBerry, Kindle Fire, and more. RhoMobile Motorola Solutions’ RhoMobile Suite, the HTML5 application development platform built to meet the needs of the next generation of business mobility. With RhoMobile Suite, comprised of RhoConnect, RhoStudio and RhoElements, device type, operating system and screen size doesn’t matter. RhoMobile applications simply work on whatever mobile devices are in use in your business — including the

What happens to an AsyncTask when the launching activity is stopped/destroyed while it is still running?

Question: I've seen few questions nearly identical to mine, but I couldn't find a complete answer that satisfies all my doubts.. so here I am.. Suppose that you have an activity with an inner class that extends the AsyncTask class like this: public class MyActivity extends Activity { private class DownloadImageTask extends AsyncTask < String , Void , Bitmap > { protected Bitmap doInBackground ( String ... urls ) { return DownloadImage ( urls [ 0 ]); } protected void onPostExecute ( Bitmap result ) { ImageView img = ( ImageView ) findViewById ( R . id . img ); img . setImageBitmap ( result ); } } @Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ); setContentView ( R . layout . main ); new DownloadImageTask (). execute ( "http://

Android - detect whether there is an Internet connection available

Solution 1: The getActiveNetworkInfo() method of ConnectivityManager returns a NetworkInfo instance representing the first connected network interface it can find or null if none if the interfaces are connected. Checking if this method returns null should be enough to tell if an internet connection is available. private boolean isNetworkAvailable () { ConnectivityManager connectivityManager = ( ConnectivityManager ) getSystemService ( Context . CONNECTIVITY_SERVICE ); NetworkInfo activeNetworkInfo = connectivityManager . getActiveNetworkInfo (); return activeNetworkInfo != null && activeNetworkInfo . isConnected (); } You will also need: <uses-permission android:name = "android.permission.ACCESS_NETWORK_STATE" /> in your android manifest. Edit: Note that having an active network interface doesn't guarantee that a particular networked service is available. Networks issues, server downtime, low