Java Reference
In-Depth Information
onlydistributepartofanapp.However,it'scommontorefertoanAPKasrepresenting
a single app.
AnAPKmust besigned with acertificate (which identifies the app'sauthor) whose
privatekeyisheldbyitsdeveloper.Thecertificatedoesn'tneedtobesignedbyacerti-
ficateauthority.Instead,AndroidallowsAPKstobesignedwithself-signedcertificates,
which is typical. ( Android Recipes discusses APK signing.)
APKS, USER IDS, AND SECURITY
EachAPKinstalledonanAndroiddeviceisgivenitsownuniqueLinuxuserID,and
this user ID remains unchanged for as long as the APK resides on that device.
Becausesecurityenforcementoccursattheprocesslevel,thecodecontainedinany
twoAPKscannotnormallyruninthesameprocess,becauseeachAPK'scodeneeds
torunasadifferentLinuxuser.However,youcanhavethecodeinbothAPKsrunin
thesameprocessbyassigningthesamenameofauserIDtothe <manifest> tag's
sharedUserId attribute in each APK's AndroidManifest.xml file. When
youmaketheseassignments,youtellAndroidthatthetwopackagesaretobetreated
as being the same app, with the same user ID and file permissions.
In order to retain security, only two APKs signed with the same signature (and re-
questingthesame sharedUserId valueintheirmanifests)willbegiventhesame
user ID.
Installing the Android SDK and an Android Platform
NowthatyouhaveabasicunderstandingoftheAndroidandAndroidapparchitectures,
you'llprobablywanttocreateanapp.However,youcannotdosountilyou'veinstalled
theAndroidSDKandhavealsoinstalledanAndroidplatform.Thissectionshowsyou
how to accomplish these tasks.
Accessing System Requirements
GoogleprovidesanAndroidSDKdistributionfileforeachoftheWindows,Intel-based
MacOSX,andLinux(i386)operatingsystems.Beforedownloadingandinstallingthis
file,youmustbeawareofSDKrequirements.YoucannotusetheSDKwhenyourde-
velopment platform doesn't meet these requirements.
The Android SDK supports the following operating systems:
• Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
• Mac OS X 10.5.8 or later (x86 only)
Search WWH ::




Custom Search