My widget has launched a configuration screen when selected on the screen. It works fine, I wanted to be able to touch a part of the widget to go back to that configuration screen. I have created 2 pending intentions in my widget service, but only one works is below the code:
RemoteView .SetOonClickPending Intent (R.Didimimage, MyVizet.MacControlPendingIntent (getApplicationContext) , Button1, Epigydd ID)); RemoteView.setOnClickPendingIntent (R.id.TextViewBat, myWidget.makeControlPendingIntent (getApplicationContext (), BUTTON2, appWidgetId));
And before those 2, the code of service is to choose what to do:
if (command.equals (BUTTON1)) {first Intent = new intent (this, another activity class); FirstIntent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK); StartActivity (firstIntent); // it works} and if (command. Angles (buton 2)) {toast. GetApplicationContext, "prefix button is clicked", toast. LNGHIRARR). Show (); // This work / * intends to myIntent = new intent (Intent.ACTION_VIEW, Uri.parse ("http://www.google.com")); MyIntent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK); StartActivity (myIntent); * / / / This work intent myIntent = new intent (this, myConfiguration.class); MyIntent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK); StartActivity (myIntent); // * * * These accidents * * * *}
For life, I can not understand how I can launch the configuration activity again. help please.
You only need to call getActivity ()
pending
, for a intent
This is your configuration activity, and the app ties to something in the widget via setOnClickPendingIntent ()
. Here it is showing.
Comments
Post a Comment