Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Â
Android Services Skill Sprint
1. embt.co/sprint-android-servicesBlog Notes:
Android Services
for Background Execution
Developer Skill Sprint
Tips, Tricks and Techniques
The Ultimate Application Development platform for
Widows 10, Mac, Mobile and IoT
Jim McKeeth
Developer Evangelist / Engineer
Embarcadero Technologies
Jim.McKeeth@Embarcadero.com
Nov 10th, 2015
@JimMcKeeth
2. embt.co/sprint-android-servicesBlog Notes:
This Skill Sprint Works with . . .
âą Windows
âą OS X
âą Android
âą iOS
âą RAD Studio
âą Appmethod
âą Object Pascal
âą C++
âą RAD Studio 10 Seattle DocWiki
â http://docwiki.embarcadero.com/RADStudio/Seattle/en/
âą Appmethod Summer 2015 Release DocWiki
â http://docwiki.appmethod.com/appmethod/1.17/topics/en/
âą Appmethod supports the FireMonkey
framework on all four platforms while RAD
Studio, Delphi and C++Builder also support
VCL on Windows. Contact sales with any
questions!
5. embt.co/sprint-android-servicesBlog Notes:
Android Services vs. Threads
Android Services
âą Cannot access the UI
âą Runs in main thread of
host app process
âą Can contain multiple
threads
âą Used for long running
processes
Threads
âą Cannot access the UI
âą Not accessible to other
apps
âą Terminated with app
âą Used to improve
responsiveness
6. embt.co/sprint-android-servicesBlog Notes:
Android Service Type Variations
âą IntentService
â Handle asynchronous requests (onHandleIntent(Intent) event)
â Otherwise are syncronous (onStartCommand(Intent) event)
â Both are Bindable (onBind event)
âą Local vs. Remote
â Local only accessible by host (exported = false in manifest)
â Remote cross app access (exported = true in manifest)
7. embt.co/sprint-android-servicesBlog Notes:
Android Service Wizard
âą Local Service
â Synchronous local access
âą Intent Local Service
â Asynchronous local access
âą Remote Service
â Synchronous local & remote access
âą Intent Remote Service
â Asynchronous local & remote access
10. embt.co/sprint-android-servicesBlog Notes:
Service Workarounds
âą Use RTL or low-level calls instead of FMX
components. If the service fails when started, use a
lower level call.
âą Manually edit manifest to make remote services
published.
âą Manually edit Java Templates for Intent and
Remote Services (See http://delphi.org/?p=2084)
11. embt.co/sprint-android-servicesBlog Notes:
Learning Resources
âą DocWiki
â http://docwiki.embarcadero.com/RADStudio/Seattle/en/Android_Service
â http://docwiki.embarcadero.com/RADStudio/Seattle/en/Creating_Android_Services
âą CodeRage X â Android Services on YouTube
â http://embt.co/crx-android-services
âą Blog Posts
â http://delphi.org/tag/android-services/
â http://community.embarcadero.com/blogs/entry/download-an-image-in-background-
with-android-services
Download a free trial!
embt.co/trialdownloads
12. embt.co/sprint-android-servicesBlog Notes:
Next Time . . .
GPU Computing with OpenCL
See the full schedule and replays at embt.co/Sprints15
âą Tuesday, the 17th of November, 2014
â 6AM San Francisco / 9AM New York / 2PM London / 3PM Milan
â 11AM San Francisco / 2PM New York / 7PM London / 8PM Milan
â 5PM San Francisco / Wed 10AM Tokyo / Wed 12PM Sydney
(Based on San Francisco time. Verify your local time are correct: http://embt.co/nov17thtimes)
Download a free trial!
embt.co/trialdownloads
14. embt.co/sprint-android-servicesBlog Notes:
Q&A
Developer Skill Sprint
Tips, Tricks and Techniques
The Ultimate Application Development platform for
Widows 10, Mac, Mobile and IoT
Jim McKeeth
Developer Evangelist / Engineer
Embarcadero Technologies
Jim.McKeeth@Embarcadero.com
November 10th, 2015
@JimMcKeeth
Thank-You!
Download a free trial!
embt.co/trialdownloads