简体   繁体   中英

Linking my free app to the paid version

I have seen many posts asking how to link from a free android app to other paid version, and what I am doing is the following on the click method:

Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setData(Uri.parse(Constantes.uriAplicacionFinal));
startActivity(i);

However, when it executes I get the following exception:

06-07 11:54:15.793: ERROR/AndroidRuntime(1703): 
Caused by: android.content.ActivityNotFoundException: No Activity found to handle 
Intent { act=android.intent.action.VIEW dat=market://details?id=com.autoescuela }

Everytime I have used Intents, I have used them like this:

Intent i = new Intent(this, Login.class);
i.putExtra(Constantes.intent_login, R.string.Login);
startActivityForResult(i, Constantes.activity_login); 

So, I specifiy it which activity is the one that has to pick up the Intent, but I don't know what I have to specify to launch the Android market.

Seems that you are testing the application on an emulator as a result your market application is missing. Try to test the application on real handset, everything will be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM