0

I have app A and app B

I wanna launch B from A and only A(so no chooser)

BUT

I do NOT want to use the full package name to launch because it is not scalable

My application A goes to 10 different markets.

so I do NOT want to hardcode the package like

getPackageManager().getLaunchIntentForPackage(com.myapp.androidmarket) and getPackageManager().getLaunchIntentForPackage(com.myapp.someothermarket) and so on.

Further more what if I add a new A to some new market after I release B.

Then I need to add the new package for the new A to B and re-release B so that it can launch the new A designed for the new market

so I want to use a scheme of some sort can I launch an app with a scheme programmatically ?

Eli Barzilay
  • 28,131
  • 3
  • 62
  • 107
user498584
  • 384
  • 1
  • 7
  • 14

1 Answers1

0

This seems like a pretty straightforward case for a custom intent to launch Application B from any version of A you might choose to create. There are a number of related questions on SO and elsewhere but this may not be a bad starting point Launch an application from another application on Android.

I'm not sure what you meant by

Further more what if I add a new A to some new market after I release B.

Then I need to add the new package for the new A to B and re-release B so that it can launch the new A designed for the new market

But perhaps you had a different resolution in mind? With custom intents there's no need to re-release the target to accommodate future callers.

Community
  • 1
  • 1
Carth
  • 2,243
  • 1
  • 14
  • 26
  • Say I hard coded In Application B getLaunchIntentForPackage("com.package.application_A_Free"); getLaunchIntentForPackage("com.package.application_A_Full"); which I don't want to do. (This is the link you sent suggests going) And then I release APP B with these paths. APP B is on the market. And I relaize I need to release a new version of App A For Amazon MArket. THen I need to go to the source of B which I is on the market and add getLaunchIntentForPackage("com.package.application_A_Amazon"); and re-release B< which means B needs to go through Q/A cycle. Not Scalable – user498584 Nov 02 '11 at 18:58