Android – Starting an activity from bash

The following is part of the manifest of the app Ubersocial (Twidroid):

<manifest android:versionCode=”20304″ android:versionName=”2.0.3″ android:installLocation=”auto” package=”com.twidroid”
xmlns:android=”http://schemas.android.com/apk/res/android”>
<uses-sdk android:minSdkVersion=”7″ android:targetSdkVersion=”11″ />
<application android:theme=”@style/Theme.Sherlock.Light.DarkActionBar” android:label=”@string/app_name” android:icon=”@drawable/appicon_ut” android:name=”.UberSocialApplication” android:description=”@string/app_description” android:hardwareAccelerated=”false”>
<activity android:name=”.TwidroidClient” android:launchMode=”singleTask” android:configChanges=”keyboardHidden” android:windowSoftInputMode=”stateUnchanged”>
<intent-filter>
<action android:name=”android.intent.action.MAIN” />
<category android:name=”android.intent.category.LAUNCHER” />
</intent-filter>

So:

package=”com.twidroid
android:name=”android.intent.action.MAIN”

am start -a android.intent.action.MAIN -n com.twidroid/.TwidroidClient


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.