// set the activation action to open the browser to the game String strURL = RpolScraper.getSiteURL(context) + "/game.cgi?gi=" + strGameID; Uri uri = Uri.parse(strURL); Intent notificationIntent = new Intent(Intent.ACTION_VIEW, uri); //force browser choice Intent finalIntent; if (sharedPrefs.getBoolean("forcebrowserchoice", false) ){ finalIntent = Intent.createChooser(notificationIntent,"Choose Broswer"); } else { finalIntent = notificationIntent; } PendingIntent pintent = PendingIntent.getActivity(context, 0, finalIntent, 0); |
public static PendingIntent getActivity (Context context, int requestCode, Intent intent, int flags) Retrieve a PendingIntent that will start a new activity, like calling Context.startActivity(Intent). Note that the activity will be started outside of the context of an existing activity, so you must use the Intent.FLAG_ACTIVITY_NEW_TASK launch flag in the Intent. Parameters context The Context in which this PendingIntent should start the activity. requestCode Private request code for the sender (currently not used). <--- My applesause this isn't used!!!! intent Intent of the activity to be launched. flags May be FLAG_ONE_SHOT, FLAG_NO_CREATE, FLAG_CANCEL_CURRENT, FLAG_UPDATE_CURRENT, or any of the flags as supported by Intent.fillIn() to control which unspecified parts of the intent that can be supplied when the actual send happens. Returns Returns an existing or new PendingIntent matching the given parameters. May return null only if FLAG_NO_CREATE has been supplied. |
Your Feeds |
---|
RDF v1.0 | http://m.rpol.net/feeds.cgi?q=1CEBKD8halkgRSsf54wU |
RSS v2.0 | http://m.rpol.net/feeds.cgi?q=2CEBKD8halkgRSsf54wU |
Atom v1.0 | http://m.rpol.net/feeds.cgi?q=3CEBKD8halkgRSsf54wU |