SlideShare uma empresa Scribd logo
1 de 44
Subhead (Arial, U/L, 18pt)
Lori Fraleigh
Director
Developer Platforms, Tools, and Technical Services
BUSINESS UNIT NAME (Arial Bold, Caps, 24pt)
MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC.
All other trademarks are the property of their respective owners. © 2010 Motorola Mobility, Inc. All rights reserved.
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
starts here
LEADERSHIP
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
DEVELOPDESIGN DISCOVER DISTRIBUTE
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
DESIGN
DETAILED PRODUCT
INFORMATION AND SPECS
PRACTICAL ADVICE,
ARTICLES, DOCUMENTATION
EXPERT SUPPORT, FORUMS,
KNOWLEDGE BASE
COMMUNITY INTERACTION,
BLOGS, PODCASTS
GLOBAL NEWS, EVENTS
AND TRAINING
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
DESIGNDESIGN DEVELOP
GREAT OUT-OF-BOX EXPERIENCE
BUILT ON ECLIPSE
ACTIVITY CREATION WIZARDS
CODE SNIPPETS
IMPROVED LOCALIZATION TOOLS
DEVICE EMULATORS
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
DESIGN DEVELOP
REMOTE ON-DEVICE TESTING
ACCESS TO LIVE REGIONAL
NETWORKS
EARLY ACCESS – GET TO
MARKET FIRST
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
DISCOVERDESIGN DEVELOPDEVELOP
EARLY ACCESS TO TOOLS,
SDKS, SPECS, ARTICLES
PRIVATE DISCUSSION BOARDS
ACCESS TO PRE-RELEASE
HARDWARE
PREMIUM RESOURCES FROM
WORLD-CLASS PROVIDERS
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
DESIGN DEVELOP DISCOVER DISTRIBUTE
APP SUBMISSION INTEGRATED
INTO MOTODEV
INTEGRATED TESTINGAND
CERTIFICATION
TARGETED MERCHANDISING
AND PROMOTIONS
EFFECTIVELY SHOWCASE
AND SELL YOUR
SIGNATURE APPS
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
WE ARE INVESTING IN YOUR FUTURE
Anna Schaller
Android Advocate
Developer Community Technical Services
Motorola Mobility
MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC.
All other trademarks are the property of their respective owners. © 2010 Motorola Mobility, Inc. All rights reserved.
Using the Motorola i1
SDK Add-On
Agenda
00 Motorola i1 SDK Add-on Walkthrough
00 Working with the iExchange Service
01 Architecture
02 Using Intents to pass messages
03 Demo
00 Content Provider Extensions
01 Contacts
02 CallLog
03 MOTODEV Studio Database Explorer
© 2010 Motorola Mobility, Inc.
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Using the i1 SDK Add-On
• Motorola i1 is based on Android 1.5
– i1 SDK add-on uses Android SDK 1.5 APIs
• Setting up development environment
– Install in add-ons folder within Android SDK
– Create a new projects from samples
– Create an AVD emulator for Motorola i1
– Bring up Motorola i1 emulator
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Create Development Environment
1. Install in add-ons folder within Android SDK
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Create Development Environment (con’t)
a) Importing them
 File ->
 Import ->
 Existing Projects in
Workspace
 Browse to /add-
ons/Motorola
i1/samples folder
b) Create New Project
from samples
2. Pull in iExchange Samples
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Create Development Environment (con’t)
• Two new projects
– iExchangeSender
– iExchangeReceiver
• Two new libraries
– motorola.provider.jar
– iexchangelib.jar
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Create Development Environment (con’t)
3. Create i1 AVD
– Select Motorola i1 APIs
as target
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Create Development Environment (con’t)
4. Bring up emulator
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Working with the iExchange Service
• Allows messages to be dispatched between
devices using the PTT protocol
– Takes advantage of empty frames of talk time for passing
data
• Three kinds of dispatch ids supported
– Private Id : 1-to-1 communication
– Group Id: 1-to-many communication
– SDG Id: Selective Dynamic Group Call
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
iExchange Architecture
• Components at every layer of Android to support
functionality
• Engine
– lowest level handles communication at RIL
• Background Service
– framework level handles communication between
engine and application
• Android application
– takes input from the user and broadcasts the message
using the iExchange library
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
iExchange Initialization
• When device starts up,
iExchange service registers
with iExchange engine and
waits….
Package
Manager
Content
Provider
<…>
iExchange
Service
iExchange
Engine network
BP layer
Framework layer
App
Application layer
• iExchange engine determines
whether the phone is connected to
the network and returns a connected
state to iExchange service
• Once iExchange service
receives connected state,
registers for message
intents and waits on
broadcast from iExchange
apps….
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
iExchange Communication
• Uses standard Android mechanisms already in place
• Activities, services, and broadcast receivers are activated
through structured messages embedded in an Intent
– Intents are used throughout Android for system-level
message passing (low battery, screen on, time zone change)
– Intents are also used in Android to launch another activity,
service, or broadcast receiver
– Once launched those activities, services, and broadcast
receivers can receive message intents while they are running
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
iExchange Communication (con’t)
• Anatomy of an Intent
– Action: action to be performed or the action that took place and is
being reported (broadcast intents)
– Category: always set to CATEGORY_DEFAULT
– Extras: additional information (including data)
• Intents are delivered in one of three ways:
– startActivity(intent) launches an Activity -- if not already
started -- and delivers the embedded message
– startService(intent) launches a Service -- if not already
started -- and delivers the embedded message
– sendBroadcast(intent) launches a Broadcast Receiver and
delivers the embedded message
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Writing an iExchange App
• import com.motorola.android.ptx.IexchangeConstant;
• iExchange library (iexchangelib.jar)
– Request Intents: initiates action
– Response Intents: returns success or failure of action
request
– Indication Intents: indicates message was sent
– Permissions: for sending and receiving
• Communication requires two modes
– Message Sender (iExchangeSender sample)
– Message Receiver (iExchangeReceiver sample)
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Writing an iExchange App (con’t)
• Standard Android app with two tasks
• Main task
– runs in UI thread
– extends Activity class
– broadcasts outbound messages
through iExchange intents
– does something with incoming
message
• Secondary task
– extends Broadcast Receiver class
– processes incoming iExchange intents
Activity
Broadcast
Receiver
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Dispatching Messages
Sending
Activity
Broadcast
Receiver
iExchange
Service
request intent
response intent
iExchange
Service
Receiving
Activity
Broadcast
Receiver
iExchangeSender
(phone 1)
iExchangeReceiver
(phone 2)
response intent
request intent
indication
intent
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
iExchange Request Intents
• Action
– ACTION_SEND_IEXCHANGE_PRIVATE_TEXT_MESSAGE
– ACTION_SEND_IEXCHANGE_PRIVATE_DATA_MESSAGE
– ACTION_SEND_IEXCHANGE_GROUP_TEXT_MESSAGE
– ACTION_SEND_IEXCHANGE_GROUP_DATA_MESSAGE
• Extra Data
– String DESTINATION_ADDR (Push-To-Talk Id - private)
– int LOCAL_PORT (Sender Port Identifier)
– int REMOTE_PORT (Receiver Port Identifier)
– String GROUP_NUMBER (Group Call ID - group)
– String AREA (Group Call Area - group)
– String TEXT (Message)
– byte[] DATA (Data)
• Category
– CATEGORY_DEFAULT
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
iExchange Indication Intent
• Extra Data
– byte IND_DATA_TYPE (Data type – ‘T’ext or ‘B’inary)
– int IND_DATA_LENGTH (Length of data)
– byte[] IND_DATA (Data message)
– int IND_DATA_REMOTE_PORT (Sender’s Port Identifier)
• Action
– ACTION_IEXCHANGE_MESSAGE_RECEIVED
• Category
– CATEGORY_DEFAULT
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
iExchange Response Intent
• Action
– ACTION_IEXCHANGE_RESPONSE
• Category
– CATEGORY_DEFAULT
• Extra Data
– int RSP_IEXCHANGE_REQ_TYPE (SEND_PRIVATE_TEXT_MESSAGE)
(SEND_PRIVATE_DATA_MESSAGE)
(SEND_GROUP_TEXT_MESSAGE)
(SEND_GROUP_DATA_MESSAGE)
– byte RSP_IEXCHANGE_RESULT (RESULT_RESERVED)
(RESULT_SUCCESSFUL)
(RESULT_ERROR_INVALID_ID)
(RESULT_ERROR_MESSAGE_TOO_LONG)
(RESULT_ERROR_GENERIC_FAILURE)
(RESULT_IN_PROGRESS)
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
New Permissions
• RECEIVE_IEXCHANGE
– Allows the application to receive iExchange Response and
Indication Intents
• SEND_IEXCHANGE
– Allows the application to send iExchange Request Intents
<uses-permission
android:name="com.motorola.android.iexchange.permission
.RECEIVE_IEXCHANGE"></uses-permission>
<uses-permission
android:name="com.motorola.android.iexchange.permission
.SEND_IEXCHANGE"></uses-permission>
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Code and Demo
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
HEADLINE (Arial Bold, Caps, 24pt)
Place audio or video here
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Content Providers
• Generic interface mechanism that lets you share data
between applications
• By abstracting away the underlying data source,
Content Providers let you decouple your application
layer from the data layer, making your applications
data-source agnostic
• How a content provider actually stores its data under
the covers is up to its designer
• All content providers implement a common interface for
querying the provider and returning results
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Content Providers
• Many of the native databases have been made
available as Content Providers, accessible by 3rd party
applications
• Built-in Content Providers available to you:
– Browser
– CallLog
– Contacts
– MediaStore
– Settings
• Motorola i1 extends the Contacts and CallLog Content
Providers (and underlying tables)
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Content Resolvers
• Access to all Content Providers is handled through
ContentResolver objects calling
getContentResolver()
<. . .>
ContentResolver cr = getContentResolver();
<. . .>
• Can then use ContentResolver’s methods
– query()
– insert()
– delete()
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Queries and Cursors
• Queries in Android are returned as Cursor objects
• Cursors are a managed way of controlling your position
(row) in the result set of a database query
• To execute a query…call query()
ContentResolver cr = getContentResolver();
Cursor myCursor = cr.query(
Uri, // data set (e.g. table(s))
projection, // include table columns
where clause, // filter out rows
selection, // data for where ‘?’
sort order // sort in order
)
• Navigate query results with moveTo<position>()
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
URIs
• Each content provider exposes a public URI that uniquely
identifies its data set
• A content provider that controls multiple data sets (multiple
tables) exposes a separate URI for each one
• Two forms:
– All URIs for providers begin with the string "content://"
– Android defines CONTENT_URI constants for all the providers that
come with the platform
android.provider.Contacts.Phones.CONTENT_URI
android.provider.CallLog.Calls.CONTENT_URI
• Use both forms when working with the SDK add-on
depending on what data set you need
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
i1 Extensions - Contacts
• Access
– Generic URI is People.CONTENT_URI
– import android.provider.Contacts.People
– Iden URIs now join multiple tables together
– import motorola.provider.ContactsIdenExtensions
• Tables
– Two new tables IDENDISPATCHES (dispatch numbers) and
IDENIP (ip address)
– Existing PEOPLE table extended with 3 new fields
• iden_contact_type (private id vs group id vs sdg id)
• iden_member_count (member count of sdg entry)
• iden_primary_dispatch (link to idendispatch table)
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
i1 Extensions – Contact URIs
• iDEN-specific Contacts URI’s
– "content://contacts/people-sdg“
– "content://contacts/people-talkgroup“
– "content://contacts/idendispatches“
– "content://contacts/idendispatches/#“
– "content://contacts/people/#/idendispatches“
– "content://contacts/people/#/idendispatches/#“
– "content://contacts/idendispatches/filter_name/*“
– <. . .>
• Check documentation to find out what data set is
available to build you projection
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Using iDEN URIs
final String[] PROJECTION = new String[] {
People._ID, People.NAME,
PeopleIdenExtensionsColumns.PRIMARY_DISPATCH_ID,
PeopleIdenExtensionsColumns.CONTACT_TYPE,
IdenDispatches.NUMBER,
IdenDispatches.TYPE,
IdenDispatches.LABEL
};
ContentResolver cr = getContentResolver();
Cursor c =
cr.query(Uri.parse("content://contacts/idendispatches"),
PROJECTION, null , null, null );
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
i1 Extensions - CallLog
• Access
– Generic URI is Calls.CONTENT_URI
– import android.provider.CallLog.Calls.CONTENT_URI
– CallLog URIs join multiple tables together
– import motorola.provider.CallLogIdenExtensions
• Tables
– Call log is stored in contacts database in the CALL table
– New fields added to existing table
• Idencategory (phone call vs dispatch vs ptx attachment)
• Idennumber (dispatch ptt number)
• Idensubtype (subtype of dispatch – private, talkgroup, etc)
• Ipaddress (ip address)
• Membercount (member count of SDG entry)
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
MOTODEV Database Explorer
• Gives you a window
into Android databases
• Allows you to examine
and modify the contacts
database
• Only works on
emulator, does not work
on devices
• Let’s see……
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
CONTACTS
• Join developer program at developer.motorola.com
– MOTODEV Studio
– Product SDK Add-Ons
– Technical Articles
– Developer Forum
– Product Specs
– More……
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
Device Giveaway
• Under 40 seats in this room is an
i1 postcard
• If you find a postcard, bring it and
your business card to booth #23
between 6:30 and 9:30 tonight
• Employees of Motorola, Sprint, or
any competitor of Motorola are
not eligible to win.
Working with the Motorola i1 SDK Add-On
© 2010 Motorola Mobility, Inc.
LEGAL
• Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.
• Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.

Mais conteúdo relacionado

Semelhante a Using the Motorola MOTODEV i1 SDK add-on

IoT app development services in Mohali.pdf
IoT app development services in Mohali.pdfIoT app development services in Mohali.pdf
IoT app development services in Mohali.pdfEllocent Labs
 
Gregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud JourneyGregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud JourneyCloud Native Day Tel Aviv
 
DTT OIC, OIP IoT platform
DTT OIC, OIP IoT platformDTT OIC, OIP IoT platform
DTT OIC, OIP IoT platformNguyen Trung
 
Workshop on Android App Development
Workshop on Android App DevelopmentWorkshop on Android App Development
Workshop on Android App DevelopmentEntwicklers
 
Meego presentation
Meego presentation   Meego presentation
Meego presentation manju2611
 
2018.11 eclipse overview (japan meeting)
2018.11 eclipse overview (japan meeting)2018.11 eclipse overview (japan meeting)
2018.11 eclipse overview (japan meeting)Mike Milinkovich
 
OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...
OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...
OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...mfrancis
 
Top 10 Challenges in IoT App Development.pdf
Top 10 Challenges in IoT App Development.pdfTop 10 Challenges in IoT App Development.pdf
Top 10 Challenges in IoT App Development.pdfFuGenx Technologies
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemBoydlee Pollentine
 
What’s new in Flutter3.pptx
What’s new in Flutter3.pptxWhat’s new in Flutter3.pptx
What’s new in Flutter3.pptxShantanuApurva1
 
New Features for Mobile Device Management (MDM) With Entgra
New Features for Mobile Device Management (MDM) With EntgraNew Features for Mobile Device Management (MDM) With Entgra
New Features for Mobile Device Management (MDM) With EntgraVichitra Godamunne
 
Best Android training in Chandigarh - 34
Best Android training in Chandigarh - 34Best Android training in Chandigarh - 34
Best Android training in Chandigarh - 34ashish09714
 
Entgra IoT Server 4.1 Webinar.pdf
Entgra IoT Server 4.1 Webinar.pdfEntgra IoT Server 4.1 Webinar.pdf
Entgra IoT Server 4.1 Webinar.pdfVichitraGodamunne1
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App DevelopmentAbhijeet Gupta
 
MYZEAL IT Solutions-Offshore Mobile Apps Development Company India
MYZEAL IT Solutions-Offshore Mobile Apps Development Company IndiaMYZEAL IT Solutions-Offshore Mobile Apps Development Company India
MYZEAL IT Solutions-Offshore Mobile Apps Development Company IndiaMYZEAL IT Solutions LLC
 

Semelhante a Using the Motorola MOTODEV i1 SDK add-on (20)

Enterprise mobility
Enterprise mobilityEnterprise mobility
Enterprise mobility
 
IoT app development services in Mohali.pdf
IoT app development services in Mohali.pdfIoT app development services in Mohali.pdf
IoT app development services in Mohali.pdf
 
Gregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud JourneyGregory Touretsky - Intel IT- Open Cloud Journey
Gregory Touretsky - Intel IT- Open Cloud Journey
 
My New Resume23042015
My New Resume23042015My New Resume23042015
My New Resume23042015
 
DTT OIC, OIP IoT platform
DTT OIC, OIP IoT platformDTT OIC, OIP IoT platform
DTT OIC, OIP IoT platform
 
Workshop on Android App Development
Workshop on Android App DevelopmentWorkshop on Android App Development
Workshop on Android App Development
 
Resume jyoti gupta
Resume jyoti guptaResume jyoti gupta
Resume jyoti gupta
 
Meego presentation
Meego presentation   Meego presentation
Meego presentation
 
Subramanyam_Nalam
Subramanyam_NalamSubramanyam_Nalam
Subramanyam_Nalam
 
2018.11 eclipse overview (japan meeting)
2018.11 eclipse overview (japan meeting)2018.11 eclipse overview (japan meeting)
2018.11 eclipse overview (japan meeting)
 
OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...
OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...
OSGi Alliance Community Event 2007 - Business Session#1 - Brandon Annan, Lead...
 
Top 10 Challenges in IoT App Development.pdf
Top 10 Challenges in IoT App Development.pdfTop 10 Challenges in IoT App Development.pdf
Top 10 Challenges in IoT App Development.pdf
 
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium EcosystemAppcelerator Titanium - An Introduction to the Titanium Ecosystem
Appcelerator Titanium - An Introduction to the Titanium Ecosystem
 
What’s new in Flutter3.pptx
What’s new in Flutter3.pptxWhat’s new in Flutter3.pptx
What’s new in Flutter3.pptx
 
New Features for Mobile Device Management (MDM) With Entgra
New Features for Mobile Device Management (MDM) With EntgraNew Features for Mobile Device Management (MDM) With Entgra
New Features for Mobile Device Management (MDM) With Entgra
 
Best Android training in Chandigarh - 34
Best Android training in Chandigarh - 34Best Android training in Chandigarh - 34
Best Android training in Chandigarh - 34
 
Entgra IoT Server 4.1 Webinar.pdf
Entgra IoT Server 4.1 Webinar.pdfEntgra IoT Server 4.1 Webinar.pdf
Entgra IoT Server 4.1 Webinar.pdf
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App Development
 
Multi-OS Engine Technology Overview
Multi-OS Engine Technology OverviewMulti-OS Engine Technology Overview
Multi-OS Engine Technology Overview
 
MYZEAL IT Solutions-Offshore Mobile Apps Development Company India
MYZEAL IT Solutions-Offshore Mobile Apps Development Company IndiaMYZEAL IT Solutions-Offshore Mobile Apps Development Company India
MYZEAL IT Solutions-Offshore Mobile Apps Development Company India
 

Mais de Motorola Mobility - MOTODEV

HTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the FutureHTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the FutureMotorola Mobility - MOTODEV
 
Getting Your App Discovered: Android Market & Beyond
Getting Your App Discovered: Android Market & BeyondGetting Your App Discovered: Android Market & Beyond
Getting Your App Discovered: Android Market & BeyondMotorola Mobility - MOTODEV
 
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript Motorola Mobility - MOTODEV
 
Consejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tabletsConsejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tabletsMotorola Mobility - MOTODEV
 
Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas Motorola Mobility - MOTODEV
 
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuarioCómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuarioMotorola Mobility - MOTODEV
 
Gráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e RenderscriptGráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e RenderscriptMotorola Mobility - MOTODEV
 

Mais de Motorola Mobility - MOTODEV (20)

HTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the FutureHTML5 vs Native Android: Smart Enterprises for the Future
HTML5 vs Native Android: Smart Enterprises for the Future
 
The Enterprise Dilemma: Native vs. Web
The Enterprise Dilemma: Native vs. WebThe Enterprise Dilemma: Native vs. Web
The Enterprise Dilemma: Native vs. Web
 
Kill the Laptop!
Kill the Laptop!Kill the Laptop!
Kill the Laptop!
 
MOTODEV App Validator
MOTODEV App ValidatorMOTODEV App Validator
MOTODEV App Validator
 
Beautifully Usable, Multiple Screens Too
Beautifully Usable, Multiple Screens TooBeautifully Usable, Multiple Screens Too
Beautifully Usable, Multiple Screens Too
 
Getting the Magic on Android Tablets
Getting the Magic on Android TabletsGetting the Magic on Android Tablets
Getting the Magic on Android Tablets
 
Getting Your App Discovered: Android Market & Beyond
Getting Your App Discovered: Android Market & BeyondGetting Your App Discovered: Android Market & Beyond
Getting Your App Discovered: Android Market & Beyond
 
Introducing Fragments
Introducing FragmentsIntroducing Fragments
Introducing Fragments
 
Taking Advantage of Webtop
Taking Advantage of WebtopTaking Advantage of Webtop
Taking Advantage of Webtop
 
Building Quality Into Your Apps Through Testing
Building Quality Into Your Apps Through TestingBuilding Quality Into Your Apps Through Testing
Building Quality Into Your Apps Through Testing
 
Top Tips for Android UIs
Top Tips for Android UIsTop Tips for Android UIs
Top Tips for Android UIs
 
Designing Apps for Motorla Xoom Tablet
Designing Apps for Motorla Xoom TabletDesigning Apps for Motorla Xoom Tablet
Designing Apps for Motorla Xoom Tablet
 
Diseñando aplicaciones para el Motorola XOOM
Diseñando aplicaciones para el Motorola XOOM Diseñando aplicaciones para el Motorola XOOM
Diseñando aplicaciones para el Motorola XOOM
 
Presentación de los fragmentos
Presentación de los fragmentos Presentación de los fragmentos
Presentación de los fragmentos
 
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
Gráficos cada vez más rápidos. Cómo usar NDK y RenderScript
 
Consejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tabletsConsejos principales para Android UI Cómo alcanzar la magia en los tablets
Consejos principales para Android UI Cómo alcanzar la magia en los tablets
 
Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas Cómo agregar calidad a sus aplicaciones mediante pruebas
Cómo agregar calidad a sus aplicaciones mediante pruebas
 
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuarioCómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
Cómo aprovechar Webtop Cómo HTML5 mejora la experiencia del usuario
 
Principais dicas para UIs do Android
Principais dicas para UIs do AndroidPrincipais dicas para UIs do Android
Principais dicas para UIs do Android
 
Gráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e RenderscriptGráficos cada vez mais rápidos utilização de NDK e Renderscript
Gráficos cada vez mais rápidos utilização de NDK e Renderscript
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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...apidays
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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 DevelopmentsTrustArc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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...Miguel Araújo
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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...
 

Using the Motorola MOTODEV i1 SDK add-on

  • 1. Subhead (Arial, U/L, 18pt) Lori Fraleigh Director Developer Platforms, Tools, and Technical Services BUSINESS UNIT NAME (Arial Bold, Caps, 24pt) MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC. All other trademarks are the property of their respective owners. © 2010 Motorola Mobility, Inc. All rights reserved.
  • 2. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. starts here LEADERSHIP
  • 3. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. DEVELOPDESIGN DISCOVER DISTRIBUTE
  • 4. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. DESIGN DETAILED PRODUCT INFORMATION AND SPECS PRACTICAL ADVICE, ARTICLES, DOCUMENTATION EXPERT SUPPORT, FORUMS, KNOWLEDGE BASE COMMUNITY INTERACTION, BLOGS, PODCASTS GLOBAL NEWS, EVENTS AND TRAINING
  • 5. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. DESIGNDESIGN DEVELOP GREAT OUT-OF-BOX EXPERIENCE BUILT ON ECLIPSE ACTIVITY CREATION WIZARDS CODE SNIPPETS IMPROVED LOCALIZATION TOOLS DEVICE EMULATORS
  • 6. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. DESIGN DEVELOP REMOTE ON-DEVICE TESTING ACCESS TO LIVE REGIONAL NETWORKS EARLY ACCESS – GET TO MARKET FIRST
  • 7. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. DISCOVERDESIGN DEVELOPDEVELOP EARLY ACCESS TO TOOLS, SDKS, SPECS, ARTICLES PRIVATE DISCUSSION BOARDS ACCESS TO PRE-RELEASE HARDWARE PREMIUM RESOURCES FROM WORLD-CLASS PROVIDERS
  • 8. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. DESIGN DEVELOP DISCOVER DISTRIBUTE APP SUBMISSION INTEGRATED INTO MOTODEV INTEGRATED TESTINGAND CERTIFICATION TARGETED MERCHANDISING AND PROMOTIONS EFFECTIVELY SHOWCASE AND SELL YOUR SIGNATURE APPS
  • 9. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. WE ARE INVESTING IN YOUR FUTURE
  • 10. Anna Schaller Android Advocate Developer Community Technical Services Motorola Mobility MOTOROLA and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC. All other trademarks are the property of their respective owners. © 2010 Motorola Mobility, Inc. All rights reserved. Using the Motorola i1 SDK Add-On
  • 11. Agenda 00 Motorola i1 SDK Add-on Walkthrough 00 Working with the iExchange Service 01 Architecture 02 Using Intents to pass messages 03 Demo 00 Content Provider Extensions 01 Contacts 02 CallLog 03 MOTODEV Studio Database Explorer © 2010 Motorola Mobility, Inc.
  • 12. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Using the i1 SDK Add-On • Motorola i1 is based on Android 1.5 – i1 SDK add-on uses Android SDK 1.5 APIs • Setting up development environment – Install in add-ons folder within Android SDK – Create a new projects from samples – Create an AVD emulator for Motorola i1 – Bring up Motorola i1 emulator
  • 13. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Create Development Environment 1. Install in add-ons folder within Android SDK
  • 14. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Create Development Environment (con’t) a) Importing them  File ->  Import ->  Existing Projects in Workspace  Browse to /add- ons/Motorola i1/samples folder b) Create New Project from samples 2. Pull in iExchange Samples
  • 15. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Create Development Environment (con’t) • Two new projects – iExchangeSender – iExchangeReceiver • Two new libraries – motorola.provider.jar – iexchangelib.jar
  • 16. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Create Development Environment (con’t) 3. Create i1 AVD – Select Motorola i1 APIs as target
  • 17. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Create Development Environment (con’t) 4. Bring up emulator
  • 18. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Working with the iExchange Service • Allows messages to be dispatched between devices using the PTT protocol – Takes advantage of empty frames of talk time for passing data • Three kinds of dispatch ids supported – Private Id : 1-to-1 communication – Group Id: 1-to-many communication – SDG Id: Selective Dynamic Group Call
  • 19. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. iExchange Architecture • Components at every layer of Android to support functionality • Engine – lowest level handles communication at RIL • Background Service – framework level handles communication between engine and application • Android application – takes input from the user and broadcasts the message using the iExchange library
  • 20. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. iExchange Initialization • When device starts up, iExchange service registers with iExchange engine and waits…. Package Manager Content Provider <…> iExchange Service iExchange Engine network BP layer Framework layer App Application layer • iExchange engine determines whether the phone is connected to the network and returns a connected state to iExchange service • Once iExchange service receives connected state, registers for message intents and waits on broadcast from iExchange apps….
  • 21. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. iExchange Communication • Uses standard Android mechanisms already in place • Activities, services, and broadcast receivers are activated through structured messages embedded in an Intent – Intents are used throughout Android for system-level message passing (low battery, screen on, time zone change) – Intents are also used in Android to launch another activity, service, or broadcast receiver – Once launched those activities, services, and broadcast receivers can receive message intents while they are running
  • 22. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. iExchange Communication (con’t) • Anatomy of an Intent – Action: action to be performed or the action that took place and is being reported (broadcast intents) – Category: always set to CATEGORY_DEFAULT – Extras: additional information (including data) • Intents are delivered in one of three ways: – startActivity(intent) launches an Activity -- if not already started -- and delivers the embedded message – startService(intent) launches a Service -- if not already started -- and delivers the embedded message – sendBroadcast(intent) launches a Broadcast Receiver and delivers the embedded message
  • 23. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Writing an iExchange App • import com.motorola.android.ptx.IexchangeConstant; • iExchange library (iexchangelib.jar) – Request Intents: initiates action – Response Intents: returns success or failure of action request – Indication Intents: indicates message was sent – Permissions: for sending and receiving • Communication requires two modes – Message Sender (iExchangeSender sample) – Message Receiver (iExchangeReceiver sample)
  • 24. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Writing an iExchange App (con’t) • Standard Android app with two tasks • Main task – runs in UI thread – extends Activity class – broadcasts outbound messages through iExchange intents – does something with incoming message • Secondary task – extends Broadcast Receiver class – processes incoming iExchange intents Activity Broadcast Receiver
  • 25. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Dispatching Messages Sending Activity Broadcast Receiver iExchange Service request intent response intent iExchange Service Receiving Activity Broadcast Receiver iExchangeSender (phone 1) iExchangeReceiver (phone 2) response intent request intent indication intent
  • 26. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. iExchange Request Intents • Action – ACTION_SEND_IEXCHANGE_PRIVATE_TEXT_MESSAGE – ACTION_SEND_IEXCHANGE_PRIVATE_DATA_MESSAGE – ACTION_SEND_IEXCHANGE_GROUP_TEXT_MESSAGE – ACTION_SEND_IEXCHANGE_GROUP_DATA_MESSAGE • Extra Data – String DESTINATION_ADDR (Push-To-Talk Id - private) – int LOCAL_PORT (Sender Port Identifier) – int REMOTE_PORT (Receiver Port Identifier) – String GROUP_NUMBER (Group Call ID - group) – String AREA (Group Call Area - group) – String TEXT (Message) – byte[] DATA (Data) • Category – CATEGORY_DEFAULT
  • 27. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. iExchange Indication Intent • Extra Data – byte IND_DATA_TYPE (Data type – ‘T’ext or ‘B’inary) – int IND_DATA_LENGTH (Length of data) – byte[] IND_DATA (Data message) – int IND_DATA_REMOTE_PORT (Sender’s Port Identifier) • Action – ACTION_IEXCHANGE_MESSAGE_RECEIVED • Category – CATEGORY_DEFAULT
  • 28. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. iExchange Response Intent • Action – ACTION_IEXCHANGE_RESPONSE • Category – CATEGORY_DEFAULT • Extra Data – int RSP_IEXCHANGE_REQ_TYPE (SEND_PRIVATE_TEXT_MESSAGE) (SEND_PRIVATE_DATA_MESSAGE) (SEND_GROUP_TEXT_MESSAGE) (SEND_GROUP_DATA_MESSAGE) – byte RSP_IEXCHANGE_RESULT (RESULT_RESERVED) (RESULT_SUCCESSFUL) (RESULT_ERROR_INVALID_ID) (RESULT_ERROR_MESSAGE_TOO_LONG) (RESULT_ERROR_GENERIC_FAILURE) (RESULT_IN_PROGRESS)
  • 29. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. New Permissions • RECEIVE_IEXCHANGE – Allows the application to receive iExchange Response and Indication Intents • SEND_IEXCHANGE – Allows the application to send iExchange Request Intents <uses-permission android:name="com.motorola.android.iexchange.permission .RECEIVE_IEXCHANGE"></uses-permission> <uses-permission android:name="com.motorola.android.iexchange.permission .SEND_IEXCHANGE"></uses-permission>
  • 30. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Code and Demo
  • 31. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. HEADLINE (Arial Bold, Caps, 24pt) Place audio or video here
  • 32. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Content Providers • Generic interface mechanism that lets you share data between applications • By abstracting away the underlying data source, Content Providers let you decouple your application layer from the data layer, making your applications data-source agnostic • How a content provider actually stores its data under the covers is up to its designer • All content providers implement a common interface for querying the provider and returning results
  • 33. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Content Providers • Many of the native databases have been made available as Content Providers, accessible by 3rd party applications • Built-in Content Providers available to you: – Browser – CallLog – Contacts – MediaStore – Settings • Motorola i1 extends the Contacts and CallLog Content Providers (and underlying tables)
  • 34. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Content Resolvers • Access to all Content Providers is handled through ContentResolver objects calling getContentResolver() <. . .> ContentResolver cr = getContentResolver(); <. . .> • Can then use ContentResolver’s methods – query() – insert() – delete()
  • 35. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Queries and Cursors • Queries in Android are returned as Cursor objects • Cursors are a managed way of controlling your position (row) in the result set of a database query • To execute a query…call query() ContentResolver cr = getContentResolver(); Cursor myCursor = cr.query( Uri, // data set (e.g. table(s)) projection, // include table columns where clause, // filter out rows selection, // data for where ‘?’ sort order // sort in order ) • Navigate query results with moveTo<position>()
  • 36. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. URIs • Each content provider exposes a public URI that uniquely identifies its data set • A content provider that controls multiple data sets (multiple tables) exposes a separate URI for each one • Two forms: – All URIs for providers begin with the string "content://" – Android defines CONTENT_URI constants for all the providers that come with the platform android.provider.Contacts.Phones.CONTENT_URI android.provider.CallLog.Calls.CONTENT_URI • Use both forms when working with the SDK add-on depending on what data set you need
  • 37. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. i1 Extensions - Contacts • Access – Generic URI is People.CONTENT_URI – import android.provider.Contacts.People – Iden URIs now join multiple tables together – import motorola.provider.ContactsIdenExtensions • Tables – Two new tables IDENDISPATCHES (dispatch numbers) and IDENIP (ip address) – Existing PEOPLE table extended with 3 new fields • iden_contact_type (private id vs group id vs sdg id) • iden_member_count (member count of sdg entry) • iden_primary_dispatch (link to idendispatch table)
  • 38. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. i1 Extensions – Contact URIs • iDEN-specific Contacts URI’s – "content://contacts/people-sdg“ – "content://contacts/people-talkgroup“ – "content://contacts/idendispatches“ – "content://contacts/idendispatches/#“ – "content://contacts/people/#/idendispatches“ – "content://contacts/people/#/idendispatches/#“ – "content://contacts/idendispatches/filter_name/*“ – <. . .> • Check documentation to find out what data set is available to build you projection
  • 39. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Using iDEN URIs final String[] PROJECTION = new String[] { People._ID, People.NAME, PeopleIdenExtensionsColumns.PRIMARY_DISPATCH_ID, PeopleIdenExtensionsColumns.CONTACT_TYPE, IdenDispatches.NUMBER, IdenDispatches.TYPE, IdenDispatches.LABEL }; ContentResolver cr = getContentResolver(); Cursor c = cr.query(Uri.parse("content://contacts/idendispatches"), PROJECTION, null , null, null );
  • 40. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. i1 Extensions - CallLog • Access – Generic URI is Calls.CONTENT_URI – import android.provider.CallLog.Calls.CONTENT_URI – CallLog URIs join multiple tables together – import motorola.provider.CallLogIdenExtensions • Tables – Call log is stored in contacts database in the CALL table – New fields added to existing table • Idencategory (phone call vs dispatch vs ptx attachment) • Idennumber (dispatch ptt number) • Idensubtype (subtype of dispatch – private, talkgroup, etc) • Ipaddress (ip address) • Membercount (member count of SDG entry)
  • 41. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. MOTODEV Database Explorer • Gives you a window into Android databases • Allows you to examine and modify the contacts database • Only works on emulator, does not work on devices • Let’s see……
  • 42. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. CONTACTS • Join developer program at developer.motorola.com – MOTODEV Studio – Product SDK Add-Ons – Technical Articles – Developer Forum – Product Specs – More……
  • 43. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. Device Giveaway • Under 40 seats in this room is an i1 postcard • If you find a postcard, bring it and your business card to booth #23 between 6:30 and 9:30 tonight • Employees of Motorola, Sprint, or any competitor of Motorola are not eligible to win.
  • 44. Working with the Motorola i1 SDK Add-On © 2010 Motorola Mobility, Inc. LEGAL • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Notas do Editor

  1. This page is based on the Title Slide master page. All fonts are Arial. Note font sizes and specs for line spacing, text box design and locations here and on actual pages. BUSINESS UNIT text box: all margins are 0, text anchor is bottom, height is .97” (width is flexible), text is flush left, position is horizontal .42” and vertical .46” from top left corner. Box should be aligned with nearest left guide. THIS TEXT BOX IS DEFINED ON MASTER SLIDE (location and design will reset to correct design when you reapply “title slide” format) Subhead text box: all margins are 0, text anchor is top, height is .3” (width is flexible), text is flush left, position is horizontal .42” and vertical 1.42” from top left corner. Box should be aligned with nearest left guide PRESENTATION text box: all margins are 0, text anchor is top, height is 1.58” (width is flexible), text is flush left, position is horizontal .42” and vertical 4.6” from top left corner. Box should be aligned with nearest left guide THIS TEXT BOX IS DEFINED ON TITLE MASTER SLIDE (location and design will reset to correct design when you reapply “title slide” format) Second Subhead text box: all margins are 0, text anchor is bottom, height is .6” (width is flexible), text is flush left, position is horizontal .42” and vertical 5.44” Copyright info text box: all margins are 0, text anchor is top, height is .22” (width is flexible), text is flush left, position is horizontal .46” and vertical 6.91” from top left corner. Version/date text box: THIS TEXT BOX IS LOCATED ON TITLE MASTER SLIDE, cannot be edited here. To edit items on the master of this slide, go to View/Master/Title Master. Do not move text boxes while editing content on Title Master. How to use this template file: Duplicate this file and change the title to reflect your project. Copy pages as needed within the file. Do not attempt to copy pages from this document into an unformatted file…you will lose the guidelines that are on these pages. If you don’t see little dotted lines criss crossing the page, make sure you go to “View” and select “Guides” Also turn off “Snap to Grid.” This document has the color scheme defined with the approved color chord. You will also lose that if you copy pages from here into another file. To make sure text doesn’t change size automatically, go to Preferences, go to the Edit tab, and make sure “autofit text to text placeholder” is NOT selected.
  2. We’ve put a focus on Android as our mobile platform and we’re extremely pleased with our strategy and investments Not only are we the largest manufacturer dedicated to succeeding with Android, now with 17 different phones in our portfolio reaching over 100 retail, carrier and distributor customers around the world. But we see this platform as the springboard to even greater innovation…for a number of reasons Motorola is only interested in working with an open platform and open communities Android continues to give us that ability by being open source… Providing a open, vibrant and solid ecosystem Supporting an updateable OS with a growing number of available mobile applications Most important, it allow us to embrace and extend the Android experience… Innovating with software and services that allow us to differentiate ourselves with consumers, developers and carriers
  3. In addition to the great distribution opportunities available with Android Market, Motorola has its own application storefront in China, Brazil, Argentina, and Mexico.
  4. Same installation process that you would use for any SDK add-on. Copy into the add-on folder under your Android SDK. Contents of SDK add-on include: Docs folder with html files describing the iExchange service and the extensions made to the contacts and calllog databases Images folder containing three files needed to create an AVD (android virtual device) or emulator Libs folder containing the two new libraries supporting the new functionality and extensions Samples folder containing three sample projects (which we will walk through) Skins folder containing the images layered over the AVD to reflect what an Motorola i1 device looks like
  5. Next you want to load the samples in the SDK add-on into your IDE (Studio or Eclipse) After launching Studio (or Eclipse) you can either import the sample projects or create a new project from the samples
  6. Two type of intents: explicit (where you specify the recipient) and implicit (where anyone who’s registered for this intent will receive it) The i1 extension uses both. Activities that are generating the message will broadcast with an implicit intent. The broadcast receivers that are listening for these intents will use an explicit intent to pass the message along.
  7. Category is typically used to further refine the filter match on the intent but for purposes of the i1 it is always set to CATEGORY_DEFAULT. It just has to be set in your application because it is needed by the intent filtering mechanism to route the intent. Extras are a key-value pair that allow you to add information to the intent. The i1 has extra data targeted to message delivery. You get at this data with get() and put() methods.
  8. There are no APIs associated with this extension. Just a series of constants that define the message types. Within the library the constants support the three different intent types: request, response, and indication intents. In order to broadcast or receive these intents there are two new permissions to add to your manifest file.
  9. So lets look at the cycle around dispatching messages using two samples in SDK add-on – iExchangeSender and iExchangeReceiver You have the SendingActivity broadcasting a request intent. In this case sending private text message to a specific phone The iExchange Service is reqistered to pick up all request intents and forward them to the appropriate phone. On phone 1 the iExchange Service forwards the message to phone 2 The iExchange Service on phone 2 receives the request intent, repackages and moves the message to an indication intent, and broadcasts the new indication intent. The broadcast receiver in the iExchangeReceiver app picks up the indication intent, launches the receiving activity with the original message. The iExchange Service on phone 2 also sends a response intent back to the iExchange Service on phone 1, which forwards it to the broadcast receiver in the iExchangeSender app
  10. Port numbers Legacy naming convention from UDP implementation on previous phones Integer values any length and combination Watch out for: port numbers may not be unique between applications
  11. In it’s native format URIs begin with the string “content://”. There are predefined constants for the built-in content providers URI for the table that matches phone numbers to people URIs for the table of recent phone calls