SlideShare a Scribd company logo
1 of 16
Telephony API
   Ramin Orujov
    22.04.2012
Agenda
•   API overview
•   Working with SMS
•   Working with phone calls
•   Working with MMS
API Overview
• http://developer.android.com/reference/andr
  oid/telephony/package-summary.html
SMS
Permissions:
• android.permission.SEND_SMS
• android.permission.RECEIVE_SMS
Main classes:
• SmsManager
• SmsMessage
SMS
How to send sms
• Get SmsManager instance
SmsManager m = SmsManager.getDefault();
• Send text sms
void sendTextMessage (String destinationAddre
  ss, String scAddress, String text, PendingIntent
   sentIntent, PendingIntentdeliveryIntent)
SMS
How to read incoming sms
Extends BroadcastReceiver and listen for action
android.provider.Telephony.SMS_RECEIVED

How to get sent and delivery report
PendingIntent for both actions
SMS
• API docs
http://developer.android.com/reference/androi
  d/telephony/SmsManager.html
Phone call
• Call number
• Detect incoming and outgoing calls
• Listen phone state changes
Phone call
How to call number
Intent intent = new Intent(Intent.ACTION_CALL,
  Uri.parse("tel:502310109"));
  startActivity(intent);

Permission:
• android.permission.CALL_PHONE
Phone call
How to detect incoming and outgoing calls
• Extend BroadcastReceiver and listen for action
android.intent.action.PHONE_STATE
android.intent.action.NEW_OUTGOING_CALL
Phone call
• How to get phone state change events
Permissions
• android.permission.READ_PHONE_STATE
• android.permission.ACCESS_COARSE_LOCATION
• android.permission.ACCESS_NETWORK_STATE
• android.permission.ACCESS_COARSE_UPDATES
Phone call
• API docs
http://developer.android.com/reference/androi
  d/telephony/TelephonyManager.html
MMS
Uri mmsUri =
   Uri.parse("content://media/external/images/media/1");

  Intent intent = new Intent(Intent.ACTION_SEND);
  intent.putExtra("sms_body", “This is a test mms  ");
  intent.putExtra(Intent.EXTRA_STREAM, mmsUri);
  intent.setType("image/png");
  startActivity(intent);
References
Pro Android 4 book
http://www.amazon.com/Pro-Android-4-Professional-
Apress/dp/1430239301/

http://mobiforge.com/developing/story/sms-messaging-android

http://developer.android.com/reference/android/telephony/Tele
phonyManager.html

http://www.tested.com/news/how-to/articles/557-how-to-
measure-cell-signal-strength-on-android-phones/
Questions?
Contact me

http://raminorucov.wordpress.com
http://www.facebook.com/ramin.orucov
http://www.linkedin.com/in/raminorujov
http://twitter.com/RaminOrujov

More Related Content

What's hot

Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMS
Jussi Pohjolainen
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
habib_786
 
Android telephony stack
Android telephony stackAndroid telephony stack
Android telephony stack
David Marques
 

What's hot (20)

HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response Structure
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMS
 
What Is Php
What Is PhpWhat Is Php
What Is Php
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
Multimedia on android
Multimedia on androidMultimedia on android
Multimedia on android
 
Alarms
AlarmsAlarms
Alarms
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
JavaScript Object Notation (JSON)
JavaScript Object Notation (JSON)JavaScript Object Notation (JSON)
JavaScript Object Notation (JSON)
 
Android telephony stack
Android telephony stackAndroid telephony stack
Android telephony stack
 
Building a MVC eCommerce Site in Under 5 Minutes
Building a MVC eCommerce Site in Under 5 MinutesBuilding a MVC eCommerce Site in Under 5 Minutes
Building a MVC eCommerce Site in Under 5 Minutes
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 
JDBC – Java Database Connectivity
JDBC – Java Database ConnectivityJDBC – Java Database Connectivity
JDBC – Java Database Connectivity
 
Php
PhpPhp
Php
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
Loops PHP 04
Loops PHP 04Loops PHP 04
Loops PHP 04
 
Hands on Session on Python
Hands on Session on PythonHands on Session on Python
Hands on Session on Python
 
Php forms
Php formsPhp forms
Php forms
 

Viewers also liked

Android Radio Layer Interface
Android Radio Layer InterfaceAndroid Radio Layer Interface
Android Radio Layer Interface
Chun-Yu Wang
 
Psi android telephony_case_study_v10
Psi android telephony_case_study_v10Psi android telephony_case_study_v10
Psi android telephony_case_study_v10
Primesoftinc
 
Voice encryption for gsm using arduino
Voice encryption for gsm using arduinoVoice encryption for gsm using arduino
Voice encryption for gsm using arduino
iruldaworld
 
RT Procedure new KTM
RT Procedure new KTMRT Procedure new KTM
RT Procedure new KTM
Raj Pradhan
 
What is a smartphone-R1
What is a smartphone-R1What is a smartphone-R1
What is a smartphone-R1
Yong Heui Cho
 
Content providers in Android
Content providers in AndroidContent providers in Android
Content providers in Android
Alexey Ustenko
 

Viewers also liked (20)

RIL and Android Telephony
RIL and Android TelephonyRIL and Android Telephony
RIL and Android Telephony
 
Android Radio Layer Interface
Android Radio Layer InterfaceAndroid Radio Layer Interface
Android Radio Layer Interface
 
Psi android telephony_case_study_v10
Psi android telephony_case_study_v10Psi android telephony_case_study_v10
Psi android telephony_case_study_v10
 
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
 
Embedded Android Workshop at Embedded Linux Conference Europe 2011
Embedded Android Workshop at Embedded Linux Conference Europe 2011Embedded Android Workshop at Embedded Linux Conference Europe 2011
Embedded Android Workshop at Embedded Linux Conference Europe 2011
 
[2C6]SQLite DB 의 입출력 특성분석 : Android 와 Tizen 사례
[2C6]SQLite DB 의 입출력 특성분석 : Android 와 Tizen 사례[2C6]SQLite DB 의 입출력 특성분석 : Android 와 Tizen 사례
[2C6]SQLite DB 의 입출력 특성분석 : Android 와 Tizen 사례
 
Labmeeting - 20150211 - Novel End-to-End Voice Encryption Method in GSM System
Labmeeting - 20150211 - Novel End-to-End Voice Encryption Method in GSM SystemLabmeeting - 20150211 - Novel End-to-End Voice Encryption Method in GSM System
Labmeeting - 20150211 - Novel End-to-End Voice Encryption Method in GSM System
 
Encrypted Voice Communications
Encrypted Voice CommunicationsEncrypted Voice Communications
Encrypted Voice Communications
 
Kernel modules
Kernel modulesKernel modules
Kernel modules
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Voice encryption for gsm using arduino
Voice encryption for gsm using arduinoVoice encryption for gsm using arduino
Voice encryption for gsm using arduino
 
RT Procedure new KTM
RT Procedure new KTMRT Procedure new KTM
RT Procedure new KTM
 
Cellular network
Cellular networkCellular network
Cellular network
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
5432 cellular network
5432 cellular network5432 cellular network
5432 cellular network
 
Kernel Configuration and Compilation
Kernel Configuration and CompilationKernel Configuration and Compilation
Kernel Configuration and Compilation
 
Android content providers
Android content providersAndroid content providers
Android content providers
 
What is a smartphone-R1
What is a smartphone-R1What is a smartphone-R1
What is a smartphone-R1
 
Voice securityprotocol review
Voice securityprotocol reviewVoice securityprotocol review
Voice securityprotocol review
 
Content providers in Android
Content providers in AndroidContent providers in Android
Content providers in Android
 

Similar to Telephony API

Android Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver TutorialAndroid Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver Tutorial
Ahsanul Karim
 

Similar to Telephony API (20)

Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone call
 
Caller ID Android Application
 Caller ID Android Application Caller ID Android Application
Caller ID Android Application
 
Contextual Voice/Communications as an App or App Feature (on Android)
Contextual Voice/Communications as an App or App Feature (on Android)Contextual Voice/Communications as an App or App Feature (on Android)
Contextual Voice/Communications as an App or App Feature (on Android)
 
Android securitybyexample
Android securitybyexampleAndroid securitybyexample
Android securitybyexample
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Scall
ScallScall
Scall
 
Broadcast Receiver
Broadcast ReceiverBroadcast Receiver
Broadcast Receiver
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Android broadcast receiver tutorial
Android broadcast receiver  tutorialAndroid broadcast receiver  tutorial
Android broadcast receiver tutorial
 
Android broadcast receiver tutorial
Android broadcast receiver   tutorialAndroid broadcast receiver   tutorial
Android broadcast receiver tutorial
 
What's new in Android O
What's new in Android OWhat's new in Android O
What's new in Android O
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Gartner Catalyst: How to succeed with your IT Mobile Strategy
Gartner Catalyst: How to succeed with your IT Mobile StrategyGartner Catalyst: How to succeed with your IT Mobile Strategy
Gartner Catalyst: How to succeed with your IT Mobile Strategy
 
Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)
 
Getting Started With Android Application Development [IndicThreads Mobile Ap...
Getting Started With Android Application Development  [IndicThreads Mobile Ap...Getting Started With Android Application Development  [IndicThreads Mobile Ap...
Getting Started With Android Application Development [IndicThreads Mobile Ap...
 
API Testing Presentations.pptx
API Testing Presentations.pptxAPI Testing Presentations.pptx
API Testing Presentations.pptx
 
Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
 
Final year project proposal
Final year project proposalFinal year project proposal
Final year project proposal
 
Android Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver TutorialAndroid Application Component: BroadcastReceiver Tutorial
Android Application Component: BroadcastReceiver Tutorial
 
Android
AndroidAndroid
Android
 

More from Rashad Aliyev

Win Phone 2 - Qaliblər
Win Phone 2 - Qaliblər Win Phone 2 - Qaliblər
Win Phone 2 - Qaliblər
Rashad Aliyev
 
Win Phone 2 - Statistika
Win Phone 2 - StatistikaWin Phone 2 - Statistika
Win Phone 2 - Statistika
Rashad Aliyev
 
Win Phone 2 - Yazılan tətbiqlər
Win Phone 2 - Yazılan tətbiqlərWin Phone 2 - Yazılan tətbiqlər
Win Phone 2 - Yazılan tətbiqlər
Rashad Aliyev
 
Preparing presentations
Preparing presentationsPreparing presentations
Preparing presentations
Rashad Aliyev
 
Using Controls, calling Launchers. IsolatedStorages and Local DataBase samples
Using Controls, calling Launchers. IsolatedStorages and Local DataBase samplesUsing Controls, calling Launchers. IsolatedStorages and Local DataBase samples
Using Controls, calling Launchers. IsolatedStorages and Local DataBase samples
Rashad Aliyev
 
Apps with the operator
Apps with the operatorApps with the operator
Apps with the operator
Rashad Aliyev
 

More from Rashad Aliyev (20)

Win Phone 2 - Qaliblər
Win Phone 2 - Qaliblər Win Phone 2 - Qaliblər
Win Phone 2 - Qaliblər
 
Win Phone 2 - Statistika
Win Phone 2 - StatistikaWin Phone 2 - Statistika
Win Phone 2 - Statistika
 
Win Phone 2 - Yazılan tətbiqlər
Win Phone 2 - Yazılan tətbiqlərWin Phone 2 - Yazılan tətbiqlər
Win Phone 2 - Yazılan tətbiqlər
 
Teqdimat
TeqdimatTeqdimat
Teqdimat
 
Preparing presentations
Preparing presentationsPreparing presentations
Preparing presentations
 
HTML5 + PhoneGap & Windows Phone
HTML5 + PhoneGap & Windows PhoneHTML5 + PhoneGap & Windows Phone
HTML5 + PhoneGap & Windows Phone
 
Using Controls, calling Launchers. IsolatedStorages and Local DataBase samples
Using Controls, calling Launchers. IsolatedStorages and Local DataBase samplesUsing Controls, calling Launchers. IsolatedStorages and Local DataBase samples
Using Controls, calling Launchers. IsolatedStorages and Local DataBase samples
 
Windows Phone8
Windows Phone8Windows Phone8
Windows Phone8
 
Apps with the operator
Apps with the operatorApps with the operator
Apps with the operator
 
Khazar University Library
Khazar University LibraryKhazar University Library
Khazar University Library
 
HTML5 + PhoneGap
HTML5 + PhoneGapHTML5 + PhoneGap
HTML5 + PhoneGap
 
Digər proqramlaşdırma dillərində Android platforması üçün proqramlaşdırma
Digər proqramlaşdırma dillərində Android platforması üçün proqramlaşdırmaDigər proqramlaşdırma dillərində Android platforması üçün proqramlaşdırma
Digər proqramlaşdırma dillərində Android platforması üçün proqramlaşdırma
 
Android Database
Android DatabaseAndroid Database
Android Database
 
Android Preferences
Android PreferencesAndroid Preferences
Android Preferences
 
Hackathon final
Hackathon finalHackathon final
Hackathon final
 
Rajab Davudov - Android Database
Rajab Davudov - Android DatabaseRajab Davudov - Android Database
Rajab Davudov - Android Database
 
Rajab Davudov - Developing Location Based Applications for Android
Rajab Davudov - Developing Location Based Applications for AndroidRajab Davudov - Developing Location Based Applications for Android
Rajab Davudov - Developing Location Based Applications for Android
 
Rajab Davudov - Android UI Design: Layouts
Rajab Davudov - Android UI Design: LayoutsRajab Davudov - Android UI Design: Layouts
Rajab Davudov - Android UI Design: Layouts
 
Ramin Orujov - Android API Overview and Repository
Ramin Orujov - Android API Overview and RepositoryRamin Orujov - Android API Overview and Repository
Ramin Orujov - Android API Overview and Repository
 
Hackathon
HackathonHackathon
Hackathon
 

Recently uploaded

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Telephony API