jar - Android SDK - Other ways? -
if needed build android sdk other developers can integrate android apps, jarring sdk way go it? far have learnt, jarring has following considerations:
- if app uses layout, have create programmatically. since jar files cant carry resources.
- the jar needs placed in lib/assets folder , added build path (in eclipse) -- learnt here: android - invoke activity within jar
- the main app have create intent object , specify package , class name in jar start activity.
any 1 have other ideas of going of above steps?
thanks george
creating jar is, in opinion, bad decision. android has specific features kind of thing you're looking for. if jar:
- provides sort of (structured) data used in other applications, use
contentprovider
; - does backround processing , makes processing's results available other applications, use
service
; - provides
activity
gets input user (or shows information something), processes , returns callingactivity
, createactivity
, application able startactivity
long it's installed on phone.
if use 1 of 3 solutions above, third party apps able probe whether application installed and, if not, prompt user install it. if application not fall 1 of 3 bullet points mentioned above should use jar. otherwise, using contentprovider
, service
or activity
provides:
- more standardized interaction between components
- better maintainability -- if update sdk won't have call uses , tell them upgrade.
- no duplication -- if provide jar , multiple applications use installed on device, multiple copies of jar present on device, using more memory has to. if provide 1 of 3 components mentioned above, 1 copy satisfy applications need use it.
again, these components designed , provided android os creating such sdks. please, use jar if really, really have to. otherwise, provide standardized contentprovider
, service
or activity
, document way it's supposed used (i.e. how use/query/integrate it).
Comments
Post a Comment