broschb
1/3/2011 - 3:58 AM

example of how to call an intent for the WiiScale application

example of how to call an intent for the WiiScale application

Uri uri =  Uri.parse("weigh://broschb.wiiscale?unit=lbs");
if (isIntentAvailable(this, "com.broschb.action.WEIGH",uri))
     startActivityForResult(new Intent("com.broschb.action.WEIGH",uri),WEIGHT_REQUEST);
else {
     // direct to market
     String APP_MARKET_URL = "market://details?id=com.broschb.wiiscale";
     Intent intent = new Intent( Intent.ACTION_VIEW,
     Uri.parse(APP_MARKET_URL));
     startActivity(intent);
     }