I am very new to writing android app, I am trying to start specific activity from an other app (App B)through my app (App A). I know how to launch the App B but I need App B do some specific task with a click of button without showing the launching process I just want to jump to that task(like playing music with out showing the introduction and starting part of App B).
This is part of App A , the place I want to do specific task from App B instead of just launching it. ( even maybe I don't need to launch it )
public void playOn(View view) {
ImageButton sound = (ImageButton) findViewById(R.id.musicButton);
if (lightt) {
sound.setImageResource(R.drawable.play_dn);
lightt = false;
} else {
sound.setImageResource(R.drawable.play_up);
lightt = true;
}
Intent intent = getPackageManager().getLaunchIntentForPackage("com.Zample.RUNiBplayMusic");
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
and this is part of App B that I have access to
<application android:icon="@drawable/ic_launcher" android:label="Bplay Music" android:name="com.Zample.RUNiBplayMusic.Common.App" android:theme="@style/AppTheme">
<activity android:launchMode="singleTask" android:name=".StartActivity" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="com.bplaymusicwifi" android:scheme="bplaymu"/>
</intent-filter>
</activity>
<activity android:finishOnTaskLaunch="true" android:name=".HelpListActivity" android:screenOrientation="portrait"/>
<activity android:launchMode="singleTask" android:name=".DeviceListActivity" android:screenOrientation="portrait"/>
<activity android:finishOnTaskLaunch="true" android:name=".PlayModeActivity" android:screenOrientation="portrait"/>
<activity android:finishOnTaskLaunch="true" android:name=".HelpListActivity" android:screenOrientation="portrait"/>
<receiver android:label="Bplay Music" android:name=".AppWidget.AppWidgetSmall">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<receiver android:label="Bplay Music" android:name=".AppWidget.AppWidgetBig">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_info_big"/>
</receiver>
<service android:name=".AppWidget.Bplay MusicService"/>
<service android:name=".Record.RecordService"/>
</application>
I think this part of the code from App B might help me. but I am not sure.
I hope you can help me how to solve this issue.