How can we launch another application from one application using
WebIntents?
Is it planned or ?
In case of android intents, its possible with action MAIN and category
LAUNCHER...
http://stackoverflow.com/questions/2780102/open-another-application-from-your-own-intent
please see the code snippet at the end..
BR
private void launchComponent(String packageName, String name){
Intent launch_intent = new Intent("android.intent.action.MAIN");
launch_intent.addCategory("android.intent.category.LAUNCHER");
launch_intent.setComponent(new ComponentName(packageName, name));
launch_intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(launch_intent);
}
public void startApplication(String application_name){
try{
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.LAUNCHER");
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
List<ResolveInfo> resolveinfo_list =
activity.getPackageManager().queryIntentActivities(intent, 0);
for(ResolveInfo info:resolveinfo_list){
if(info.activityInfo.packageName.equalsIgnoreCase(application_name)){
launchComponent(info.activityInfo.packageName,
info.activityInfo.name);
break;
}
}
}
catch (ActivityNotFoundException e) {
Toast.makeText(activity.getApplicationContext(), "There was a
problem loading the application:
"+application_name,Toast.LENGTH_SHORT).show();
}
}
Thanks for your reply...
Can you please give the idea about the changes in Intent interface in
such cases
e.g. in order to launch imageeditor application...
so would it be on based on the following lines:
var intent = new Intent;
intent.action = Intent.LAUNCH;
intent.data = 'imageeditor';
BR
On Dec 14, 3:57 pm, Paul Kinlan <paulkin...@google.com> wrote:
> Hi,
>
> It is something that we are thinking about - letting you provide a "link"
> to the app that you want to launch if you know the details.
>
> For v1 of the intent system we probably won't have it in unless there is a
> huge demand for it.
>
> P
>
>
>
>
>
>
>
>
>
> On Wed, Dec 14, 2011 at 11:37 AM, Imran <imran.za...@gmail.com> wrote:
> > Hi
>
> > How can we launch another application from one application using
> > WebIntents?
> > Is it planned or ?
>
> > In case of android intents, its possible with action MAIN and category
> > LAUNCHER...
>
> >http://stackoverflow.com/questions/2780102/open-another-application-f...
P