An
This presentation is the property of its rightful owner.
Sponsored Links
1 / 31

An ‘ do-it-yourself ’ droid PowerPoint PPT Presentation


  • 91 Views
  • Uploaded on
  • Presentation posted in: General

An ‘ do-it-yourself ’ droid. Praveen Kumar Pendyala. Outline. Brief intro to the Droid developement Setting up the Life saviors - Development tools ‘Hello Droid’ application Application structure Intelligence and beauty – Java code and UI (XMLs) Our best pals – APIs, In-built libraries

Download Presentation

An ‘ do-it-yourself ’ droid

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


An do it yourself droid

An‘do-it-yourself’droid

Praveen Kumar Pendyala


An do it yourself droid

Outline

  • Brief intro to the Droiddevelopement

  • Setting up the Life saviors - Development tools

  • ‘Hello Droid’ application

  • Application structure

  • Intelligence and beauty – Java code and UI (XMLs)

  • Our best pals – APIs, In-built libraries

  • Group chat app

    • UI and Java code

    • OnclickListeners

    • Intents

    • Multithreading

    • Network actions

    • Changing views from Java code

    • Permissions

  • Exporting and signing your application

  • Web app code


An do it yourself droid

Intro

  • Why Android ?


An do it yourself droid

Intro

  • Android versions and Stats


An do it yourself droid

Development tools - Intro

  • Eclipse

    • Requires Java Runtime Environment (JRE)

    • Like an advanced notepad/Gedit you used for C/C++

    • A general development tool for Java programming (not limited to android)

  • Android SDK

    • Contains the necessary tools to create, compile and package Android application

  • ADT (Android Development Tools)

    • Aset of components (plug-ins) which extend the Eclipse IDE with Android development capabilities


An do it yourself droid

Development tools - setup

  • JRE

    • Run and install the JRE software that came with your bundle

  • What about Eclipse, ADT, Android SDK ?

    • Lucky you are…

    • Google now bundled everything and gives you as a package which can be used directly after JRE installation ! (You may not appreciate this, as you haven’t been through earlier setup process)


An do it yourself droid

‘Hello Droid’ application

In eclipse,

File  New  Android Application Project (or) File  New  other  Android  Android Application Project


An do it yourself droid

‘Hello Droid’ application

Enter these values

Application Name : HelloDroid

Project Name: HelloDroid

Package Name: com.myfirstapp.hellodroid

Website of your application in reverse

Press Next twice………………..


An do it yourself droid

‘Hello Droid’ application

Play with the Names, Images and Shapes. I suggest, you select your fav pic, for feel 

Press Next twice again…..

(Yeah you have to select BlankActivity)


An do it yourself droid

‘Hello Droid’ application

Leave the values as they are for this session

Finish……Simple…..Isn’t it ??


An do it yourself droid

Application structure

All Java code

All images used

The UI design elements

All the words you see in the app and colors that appear

Your application details-Name, What should come 1st, Version, Services used

-Permissions that are needed, Activities(IMPORTANT !!)


An do it yourself droid

Manifest.xml

This is what gives an Idea of what your application is, what it uses and ….What not ? Almost every info


An do it yourself droid

Strings and colors


An do it yourself droid

UI design


An do it yourself droid

Java code, Libraries, APIs

API – Application Program Interface


An do it yourself droid

<app>  res  layout  activity_main.xml

Groupchat application - UI


An do it yourself droid

<app>  res  values  strings.xml

Groupchat application - Strings


An do it yourself droid

<app>  src  MainActivity.java

Groupchat application – OnclickListeners & Intents

Now lets setup an action for our button. Going to a new screen on click


An do it yourself droid

Groupchat application – Creating new XMLs and classes

  • Lets now create an Activity and corresponding Layout XML for messaging

  • Goto <app>  res  layout

    • Right click on layout  New  Android XML file  Name it ‘messaging.xml’ and finish

  • Goto <app>  src  com.<packagename>

    • Right click on package  New  Class  Name it ‘Messaging’ and finish


An do it yourself droid

<app>  res  layout  messaging.xml

Groupchat application – More on UI

Add these two as childs to the main LinearLayout


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Starting threads

Lets receive the Nick and do some settings


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Multithreading

  • Network activity always on a background thread

  • No UI changes in this thread !! (IMP)


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Network data reception


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Network data sending


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Changing views from Java code


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Extras (Special characters support)


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Activities, Permissions

  • Is that it ? Will it work ? Of course not….

Add Internet permission

Declare your class as an activity


An do it yourself droid

<app>  src <package>  Messaging.java

Groupchat application – Ready to go….

  • Just seconds away to see it live….

  • In package explorer  Click on your project  Click Run  Android application  Select your device (or) Start emulator

  • Problem ?? Device not detected ??

    • Just explore to the ‘bin’ folder in your application.

    • Copy and transfer <app>.apk file to your device


An do it yourself droid

Export and signing your application

  • By default when you press run apps are signed using debug key

    • Debug key signed apps not allowed in the market

  • To Export your application for publishing in Android market

    • File  Export  Android (Export And…)  Create a Keystroke  Create an alias  Save the apk  Finish 


An do it yourself droid

putData.php

Groupchat application – Web end


An do it yourself droid

This is just the beginning ...

I look forward to see awesome apps from you all…Please do keep me posted if you make an app in future

Hope you all enjoyed 

Thank you 


  • Login