0% found this document useful (0 votes)
35 views20 pages

Android

This document provides tips and best practices for developing Android apps, including: 1. Use the latest APIs and hardware SDKs while maintaining backward compatibility. 2. Detect devices and installations in a way that respects privacy and supports all hardware configurations. 3. Avoid common mistakes like failing to read the Android developer blog or assuming a default device orientation.

Uploaded by

Mohamed Haggag
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views20 pages

Android

This document provides tips and best practices for developing Android apps, including: 1. Use the latest APIs and hardware SDKs while maintaining backward compatibility. 2. Detect devices and installations in a way that respects privacy and supports all hardware configurations. 3. Avoid common mistakes like failing to read the Android developer blog or assuming a default device orientation.

Uploaded by

Mohamed Haggag
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
You are on page 1/ 20

OIID RO D ND R A ND A

MohamadSafwat SoftwareEngineer,Kngine

HARD

It's

EA

Y S

TolearnaboutAndroid.

EXPERT?

Areyouan

FEATURED?

HowdoIget

ewant opllewant appspe appspeop eate Crreate C

want eywant knowth 'ttknowthey edon eoplledon' eappsp tteappspeop Crrea C ea

UseandsupportthelatestAPIsandHardware 1
SDKsarebackwardcompatible

3
Useinterfacesorparallelactivities forbackwardcompatibility.

2
NewAPIsoptimizeefficiency

usedifferentactivitiesforthesametask dependingonthedevice.

PARALLELACTIVITY
pattern
ivity m act Shi UI as no H

ES AC RF TE IN

ers listen ion entat latform t ori ep feren Dif on th ing epend d

FEEDBACK
UseAnalytics Tofind Usagepatterns

Getrealuser

UseAndroidMarket Forpublicor PrivateBeta

s tic ly na A nd se U fi rns e To att p ge a Us

Protectyour packagename 1 Upload(don't publish)the packagebefore distributingitto anyone Ifyouloseyour keystoreyourapp becomesorphan Assumingnatural orientationisportrait
Use Display.getRotation();

ROOKIE MISTAKES
2

Detectingdevices Ratherthan 3 installations

ROOKIE MISTAKES
4 Notreadingthe Androiddeveloper blog
http://android developers.blogspot.com

TelephonyManager.getDeviceId() returnsnullofthedevicedoesnot supporttelephony. MacaddressmaynotworkifWiFior Bluetoothismissingoroff.

Whynotdetect devices?

Settings.Secure.ANDROID_IDisreseton wipe.

GenerateauniqueID.

DetectInstallations

Alternative?

if(uniqueID == null) { UniqueID = UUID.randomUUID().toString(); }

THEFIVEDEADLYSINS

Adaptive

Psychic

GREAT App
Fresh
Smooth

for

FRESH

Alwaysuptodate. Youdon'thavetowait.

Location 1 Usethepassive Locationprovider.

TOBE FRESH
2 Data Sendupdatesto appsaccordingto thedevicestatus. (Preservebattery, runasaservice).

PASSIVE LOCATION PROVIDER

You might also like