arm - How do I make an embedded Android OS with just one app? -


i make own embedded system built on android (arm) using devices distributed android without launcher.

or

i want start android application launched on top , refuse close , shutdown android app.

essentially you're trying have custom build of aosp "home" application. if /packages/apps/launcher2 you'll find code default home screen.

if @ androidmanifest.xml file in there, you'll see this:

     <activity         android:name="com.android.launcher2.launcher"         android:launchmode="singletask"         android:cleartaskonlaunch="true"         android:statenotneeded="true"         android:theme="@style/theme"         android:screenorientation="nosensor"         android:windowsoftinputmode="stateunspecified|adjustpan">         <intent-filter>             <action android:name="android.intent.action.main" />             <category android:name="android.intent.category.home" />             <category android:name="android.intent.category.default" />             <category android:name="android.intent.category.monkey"/>         </intent-filter>     </activity> 

essentialy, says activity reacts

android.intent.category.home intent.

when system finishes booting (the activitymanager more specifically), sends intent. so, if want app start instead of launcher, create app similar intent filter , remove default launcher2 (take out of list in build/target/product/generic.mk , put yours instead). make sure relevant .mk file has this:

local_overrides_packages := home 

so long app doesn't provide way user launch other apps using icons (like launcher does), no other app started; unless of course sends activity-starting intent other path 1 controlled app - using "am" command on target's android shell.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -