Skip to main content

Sample Android Application using Cordova

  •  Creating Sample Android Program using Corodova

    Step 1: 
    Download Android SDK

    http://developer.android.com/sdk/index.html
    http://developer.android.com/sdk/index.html#download

    Add platform-tools and tools to system path

    • adt\sdk\tools
    • adt\sdk\platform-tools



    Open Eclipse and Configure android sdk

    Add jre & Jdk Path to system path

    Step 2:
     Download Apache ANT

    http://ant.apache.org/bindownload.cgi

    Extract and copy ant files to C: drive

    Add ant path to system Properties



    Add JAVA_HOME path to system Properties






    Step 3
    Create Android Application


    • Install Cordova
    Paste this code in command prompt
                    " npm install -g cordova "

    Before that install noje js for npm access




    • Map to A folder where android project to be created
    Type cmd command

    " cordova create <PROJECT NAME> <PACKAGE NAME> <PROJECT NAME> "

    eg: D:\Androi>cordova create Audio com.myaudio.app Audio



    • Map to newly created folder
    Type cmd command

    " cordova platform add android "

    eg: D:\Androi\Audio>cordova platform add android


    • Add Cordova Plugins to your project  
    refer Cordova doc for necessary plugins for your projects

    https://cordova.apache.org/docs/en/2.9.0/cordova_media_media.md.html#Media


    eg: D:\Androi\Audio>cordova plugin add org.apache.cordova.media



    • Build Cordova app


    Type cmd command

    " cordova build "

    eg: D:\Androi\Audio>cordova build


    • Now android assets folder with files created

    sample eg: D:\Androi\Audio\platforms\android\assets

    • Now you can change the index.html files with your own requirements

    Step 4

    Import project into eclipse

    Two projects will be imported to eclipse
    then run

    ENJOY CODING..!!!


    For More Reference https://www.youtube.com/watch?v=6hjvZlIR1EE

Comments

Popular posts from this blog

Bluetooth Chat Example

Manifest File <manifest xmlns:android="http://schemas.android.com/apk/res/android"       package="com.example.android.BluetoothChat"       android:versionCode="1"       android:versionName="1.0">     <uses-sdk minSdkVersion="7" />     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />     <uses-permission android:name="android.permission.BLUETOOTH" />     <application android:label="@string/app_name"                  android:icon="@drawable/app_icon" >         <activity android:name=".BluetoothChat"                   android:label="@string/app_name"                   android:configChanges="orientation|keyboardHidden">             <intent-filter> ...

Google Map v2 signed map isssue fixed

Hi Step 1: Develop Map Application  using android studio Step 2: For Map viewing we need to have google api key .in order to get api key we need to register application in google api console  https://console.developers.google.com/apis/ Step 3; For getting SHA1 Key please follow the steps            1) Go the java installed folder location , open cmd                 Eg: C:\Program Files\Java\jdk1.7.0_04\bin            2)  Type                   Windows keytool -list -v -keystore "CHANGE WITH OUR KEYSTORE LOC" -alias ALIASNAME -storepass PASSWORD -keypass PASSWORD                   Mac & Linux  keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android Ref:  http://www.truiton.com/2015/04/obtaining-sha1...

Store Image to Google Cloud Store using Google App engine java

Here is sample code for uploading image files to cloud storage bucket in google cloud platform Step 1 Create a google cloud project in cloud (https://console.cloud.google.com/)  enable cloud storage Step 2: Create a new web application project I am using Eclipse with Java for App engine Project Step 3: create a POST web service method the below code for upload image to the existing bucket in google cloud and the uploaded image url will be returned Code   @Path("/addres")  @POST       @Consumes(MediaType.MULTIPART_FORM_DATA)    public String addRestaurant( @FormDataParam("imgname")  String imagename,            @FormDataParam("file") InputStream uploadedInputStream,         @FormDataParam("file") FormDataContentDisposition restImages     ) throws IOException  {   try { // Create your service object Storage storage = St...