SlideShare a Scribd company logo
1 of 23
Download to read offline
Level 3

android camp
Maps ,
Location-based Services
           &
    Telephony API
The location-based services facility in Android sits on two pillars:

1-mapping using the package com.google.android.maps,

2-Location-based APIs.using the package android.location
                 APIs
All we need to start is :
1-Internet connection

2-accept the terms of google


Then , let's develop :D
Understanding the Mapping
               Package

   Obtain your MD5 fingerprint 
   Obtaining a map­api Key from Google (two keys) one for 
      development with the emulator and another for production 
   Understanding MapView and MapActivity
Let's get our MD5
   locate your debug certificate
Let's get our MD5




keytool -list -alias androiddebugkey -keystore
"FULL PATH OF YOUR debug.keystore FILE" -storepass android -keypass android

Enter the password : android
(only if asked)
Get your API-key now
   Use the link http://code.google.com/android/maps­
     api­signup.html
   Then enter your MD5 and accept the terms
Now let's code :D
Now let's code :D
                               mainfest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ashour.amar.map3"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="4" />

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <uses-library android:name="com.google.android.maps" />

        <activity
            android:label="@string/app_name"
            android:name=".Map3Activity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
Now let's code :D
                  add this at your layout

<com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:apiKey="0HjFnVeWB501OoE879ht4U35shuIsabH6M5UUUw"
        android:clickable="true" />
Now let's code :D
                              javaActivity
public class Map2Activity extends MapActivity{
    private MapView mapView;
private GeoPoint pt;

/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mapView = (MapView)findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);

    }
    @Override
    protected boolean isLocationDisplayed() {
    return true;
    }
@Override
protected boolean isRouteDisplayed() {
return true;
}
}
TELEPHONY API

With the telephony API you can work with messages , make
calls and use the Internet to make calls VOIP
Now let's make SMS sender
          app :D
Send messages
   You will use android.telephony.SmsManager class
   Dont forget to add the permission 
     android.permission.SEND_SMS
Sms code
                        layout code
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is /res/layout/main.xml -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

   <LinearLayout
       xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:orientation="horizontal" >

       <TextView
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Destination Address:" />

       <EditText
           android:id="@+id/addrEditText"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:phoneNumber="true"
           android:text="01095996548" />
   </LinearLayout>
<LinearLayout
       xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:orientation="vertical" >

       <TextView
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Text Message:" />

       <EditText
           android:id="@+id/msgEditText"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:text="hello sms" />
   </LinearLayout>

   <Button
       android:id="@+id/sendSmsBtn"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:onClick="doSend"
       android:text="Send Text Message" />

</LinearLayout>
Sms code
                      activity code
public class SmsActivity extends Activity {
/** Called when the activity is first created. */
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}

public void doSend(View view) {
EditText addrTxt = (EditText) findViewById(R.id.addrEditText);
EditText msgTxt = (EditText) findViewById(R.id.msgEditText);
try {
sendSmsMessage(addrTxt.getText().toString(), msgTxt.getText()
.toString());
Toast.makeText(this, "SMS Sent", Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(this, "Failed to send SMS", Toast.LENGTH_LONG)
.show();
e.printStackTrace();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
}

private void sendSmsMessage(String address, String message)
throws Exception {
SmsManager smsMgr = SmsManager.getDefault();
smsMgr.sendTextMessage(address, null, message, null, null);
}
}
I think you know your way
            now
Good books you can use


   pro android 3 (my best )
   OReilly ­ Learning Android
   professional android application development
   Pro   Android Media Developing Graphics 
thanks

         Amar ashour
 amar_ashour@hotmail.com
https://www.facebook.com/amar.ashour

More Related Content

What's hot

21 android2 updated
21 android2 updated21 android2 updated
21 android2 updatedGhanaGTUG
 
Training Session 2
Training Session 2 Training Session 2
Training Session 2 Vivek Bhusal
 
What's new in Android Wear 2.0
What's new in Android Wear 2.0What's new in Android Wear 2.0
What's new in Android Wear 2.0Peter Friese
 
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMohammad Shaker
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesMichael Galpin
 
Desenvolver para Chromecast
Desenvolver para ChromecastDesenvolver para Chromecast
Desenvolver para ChromecastPedro Veloso
 
Android development orientation for starters v4 seminar
Android development orientation for starters v4   seminarAndroid development orientation for starters v4   seminar
Android development orientation for starters v4 seminarJoemarie Amparo
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Eihiro Saishu
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgetsAndroid Tutorials : Basic widgets
Android Tutorials : Basic widgetsPrajyot Mainkar
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Roger Kitain
 

What's hot (20)

Day seven
Day sevenDay seven
Day seven
 
Android Widget
Android WidgetAndroid Widget
Android Widget
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated
 
Training Session 2
Training Session 2 Training Session 2
Training Session 2
 
What's new in Android Wear 2.0
What's new in Android Wear 2.0What's new in Android Wear 2.0
What's new in Android Wear 2.0
 
Mobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 AndroidMobile Software Engineering Crash Course - C03 Android
Mobile Software Engineering Crash Course - C03 Android
 
Ch2 first app
Ch2 first appCh2 first app
Ch2 first app
 
Android best practices
Android best practicesAndroid best practices
Android best practices
 
Layout
LayoutLayout
Layout
 
Android in practice
Android in practiceAndroid in practice
Android in practice
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Android
AndroidAndroid
Android
 
Android 2
Android 2Android 2
Android 2
 
Android Intent.pptx
Android Intent.pptxAndroid Intent.pptx
Android Intent.pptx
 
Desenvolver para Chromecast
Desenvolver para ChromecastDesenvolver para Chromecast
Desenvolver para Chromecast
 
Android development orientation for starters v4 seminar
Android development orientation for starters v4   seminarAndroid development orientation for starters v4   seminar
Android development orientation for starters v4 seminar
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgetsAndroid Tutorials : Basic widgets
Android Tutorials : Basic widgets
 
Hierarchy viewer
Hierarchy viewerHierarchy viewer
Hierarchy viewer
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
 

Viewers also liked

Psi android telephony_case_study_v10
Psi android telephony_case_study_v10Psi android telephony_case_study_v10
Psi android telephony_case_study_v10Primesoftinc
 
MQTT in Reactive Blocks
MQTT in Reactive BlocksMQTT in Reactive Blocks
MQTT in Reactive BlocksBitreactive
 
MQTT 101 - Getting started with the lightweight IoT Protocol
MQTT 101  - Getting started with the lightweight IoT ProtocolMQTT 101  - Getting started with the lightweight IoT Protocol
MQTT 101 - Getting started with the lightweight IoT ProtocolChristian Götz
 
Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMSJussi Pohjolainen
 
Android telephony stack
Android telephony stackAndroid telephony stack
Android telephony stackDavid Marques
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...Zvi Avraham
 
MQTT - The Internet of Things Protocol
MQTT - The Internet of Things ProtocolMQTT - The Internet of Things Protocol
MQTT - The Internet of Things ProtocolBen Hardill
 
MQTT with Java - a protocol for IoT and M2M communication
MQTT with Java - a protocol for IoT and M2M communicationMQTT with Java - a protocol for IoT and M2M communication
MQTT with Java - a protocol for IoT and M2M communicationChristian Götz
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecturedeepakshare
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in EnglishEric Xiao
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTTAndy Piper
 
MQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsMQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsBryan Boyd
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingPeter R. Egli
 

Viewers also liked (15)

Psi android telephony_case_study_v10
Psi android telephony_case_study_v10Psi android telephony_case_study_v10
Psi android telephony_case_study_v10
 
MQTT in Reactive Blocks
MQTT in Reactive BlocksMQTT in Reactive Blocks
MQTT in Reactive Blocks
 
MQTT 101 - Getting started with the lightweight IoT Protocol
MQTT 101  - Getting started with the lightweight IoT ProtocolMQTT 101  - Getting started with the lightweight IoT Protocol
MQTT 101 - Getting started with the lightweight IoT Protocol
 
Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMS
 
Android telephony stack
Android telephony stackAndroid telephony stack
Android telephony stack
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
 
Telephony API
Telephony APITelephony API
Telephony API
 
MQTT - The Internet of Things Protocol
MQTT - The Internet of Things ProtocolMQTT - The Internet of Things Protocol
MQTT - The Internet of Things Protocol
 
MQTT with Java - a protocol for IoT and M2M communication
MQTT with Java - a protocol for IoT and M2M communicationMQTT with Java - a protocol for IoT and M2M communication
MQTT with Java - a protocol for IoT and M2M communication
 
Android Architecture
Android ArchitectureAndroid Architecture
Android Architecture
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in English
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTT
 
MQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsMQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of Things
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message Queueing
 

Similar to android level 3

Android app development basics
Android app development basicsAndroid app development basics
Android app development basicsAnton Narusberg
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectJoemarie Amparo
 
Advanced Android gReporter
Advanced Android gReporterAdvanced Android gReporter
Advanced Android gReporternatdefreitas
 
Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1Joemarie Amparo
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android ProgrammingRaveendra R
 
Unit5 Mobile Application Development.doc
Unit5 Mobile Application Development.docUnit5 Mobile Application Development.doc
Unit5 Mobile Application Development.docKNANTHINIMCA
 
ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)Kenji Sakashita
 
Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Fafadia Tech
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCJim Tochterman
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development PracticesRoy Clarkson
 
How to use data binding in android
How to use data binding in androidHow to use data binding in android
How to use data binding in androidInnovationM
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivitiesmaamir farooq
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activitiesmaamir farooq
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Alfredo Morresi
 

Similar to android level 3 (20)

Android app development basics
Android app development basicsAndroid app development basics
Android app development basics
 
Android Development Made Easy - With Sample Project
Android Development Made Easy - With Sample ProjectAndroid Development Made Easy - With Sample Project
Android Development Made Easy - With Sample Project
 
Advanced Android gReporter
Advanced Android gReporterAdvanced Android gReporter
Advanced Android gReporter
 
Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1Android Development for Beginners with Sample Project - Day 1
Android Development for Beginners with Sample Project - Day 1
 
Geekcamp Android
Geekcamp AndroidGeekcamp Android
Geekcamp Android
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
 
Unit5 Mobile Application Development.doc
Unit5 Mobile Application Development.docUnit5 Mobile Application Development.doc
Unit5 Mobile Application Development.doc
 
Mini curso Android
Mini curso AndroidMini curso Android
Mini curso Android
 
ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)
 
Android Froyo
Android FroyoAndroid Froyo
Android Froyo
 
Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)
 
Ruby conf2012
Ruby conf2012Ruby conf2012
Ruby conf2012
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
How to use data binding in android
How to use data binding in androidHow to use data binding in android
How to use data binding in android
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)
 

More from DevMix

Linux and windows
Linux and windowsLinux and windows
Linux and windowsDevMix
 
android level 1
android level 1android level 1
android level 1DevMix
 
File system discovery
File system discovery File system discovery
File system discovery DevMix
 
Welcome to fci
Welcome to fciWelcome to fci
Welcome to fciDevMix
 
Android Level 2
Android Level 2Android Level 2
Android Level 2DevMix
 
cloud for entrepreneur
cloud for entrepreneurcloud for entrepreneur
cloud for entrepreneurDevMix
 

More from DevMix (6)

Linux and windows
Linux and windowsLinux and windows
Linux and windows
 
android level 1
android level 1android level 1
android level 1
 
File system discovery
File system discovery File system discovery
File system discovery
 
Welcome to fci
Welcome to fciWelcome to fci
Welcome to fci
 
Android Level 2
Android Level 2Android Level 2
Android Level 2
 
cloud for entrepreneur
cloud for entrepreneurcloud for entrepreneur
cloud for entrepreneur
 

Recently uploaded

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

android level 3

  • 3.
  • 4. The location-based services facility in Android sits on two pillars: 1-mapping using the package com.google.android.maps, 2-Location-based APIs.using the package android.location APIs
  • 5. All we need to start is : 1-Internet connection 2-accept the terms of google Then , let's develop :D
  • 6. Understanding the Mapping Package  Obtain your MD5 fingerprint   Obtaining a map­api Key from Google (two keys) one for  development with the emulator and another for production   Understanding MapView and MapActivity
  • 7. Let's get our MD5  locate your debug certificate
  • 8. Let's get our MD5 keytool -list -alias androiddebugkey -keystore "FULL PATH OF YOUR debug.keystore FILE" -storepass android -keypass android Enter the password : android (only if asked)
  • 9. Get your API-key now  Use the link http://code.google.com/android/maps­ api­signup.html  Then enter your MD5 and accept the terms
  • 11. Now let's code :D mainfest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ashour.amar.map3" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="4" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <uses-library android:name="com.google.android.maps" /> <activity android:label="@string/app_name" android:name=".Map3Activity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
  • 12. Now let's code :D add this at your layout <com.google.android.maps.MapView android:id="@+id/mapview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:apiKey="0HjFnVeWB501OoE879ht4U35shuIsabH6M5UUUw" android:clickable="true" />
  • 13. Now let's code :D javaActivity public class Map2Activity extends MapActivity{ private MapView mapView; private GeoPoint pt; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mapView = (MapView)findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); } @Override protected boolean isLocationDisplayed() { return true; } @Override protected boolean isRouteDisplayed() { return true; } }
  • 14. TELEPHONY API With the telephony API you can work with messages , make calls and use the Internet to make calls VOIP
  • 15. Now let's make SMS sender app :D
  • 16. Send messages  You will use android.telephony.SmsManager class  Dont forget to add the permission  android.permission.SEND_SMS
  • 17. Sms code layout code <?xml version="1.0" encoding="utf-8"?> <!-- This file is /res/layout/main.xml --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Destination Address:" /> <EditText android:id="@+id/addrEditText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:phoneNumber="true" android:text="01095996548" /> </LinearLayout>
  • 18. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Text Message:" /> <EditText android:id="@+id/msgEditText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hello sms" /> </LinearLayout> <Button android:id="@+id/sendSmsBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="doSend" android:text="Send Text Message" /> </LinearLayout>
  • 19. Sms code activity code public class SmsActivity extends Activity { /** Called when the activity is first created. */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void doSend(View view) { EditText addrTxt = (EditText) findViewById(R.id.addrEditText); EditText msgTxt = (EditText) findViewById(R.id.msgEditText); try { sendSmsMessage(addrTxt.getText().toString(), msgTxt.getText() .toString()); Toast.makeText(this, "SMS Sent", Toast.LENGTH_LONG).show(); } catch (Exception e) { Toast.makeText(this, "Failed to send SMS", Toast.LENGTH_LONG) .show(); e.printStackTrace(); } }
  • 20. @Override protected void onDestroy() { super.onDestroy(); } private void sendSmsMessage(String address, String message) throws Exception { SmsManager smsMgr = SmsManager.getDefault(); smsMgr.sendTextMessage(address, null, message, null, null); } }
  • 21. I think you know your way now
  • 22. Good books you can use  pro android 3 (my best )  OReilly ­ Learning Android  professional android application development  Pro   Android Media Developing Graphics 
  • 23. thanks Amar ashour amar_ashour@hotmail.com https://www.facebook.com/amar.ashour