elssiany / dashclock

Automatically exported from code.google.com/p/dashclock
0 stars 0 forks source link

API Revision: change ExtensionData.clickIntent(Intent) to clickIntent(PendingIntent) #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Having the API take a PendingIntent rather than an Intent allows the extension 
developer to determine whether it should be an Activity, Service, or Broadcast 
PendingIntent. This is important for extensions that may not need or want to 
unlock the device when clicked (e.g. a toggle).

Original issue reported on code.google.com by keyboa...@gmail.com on 13 Feb 2013 at 3:56

GoogleCodeExporter commented 9 years ago
This is currently not possible because the expanded view, which uses a 
ListView, can't supply different pending intents for each extension. The only 
solution AFAICT is to not use a ListView and instead use a LinearLayout in a 
ScrollView in the expanded widget layout.

I can consider this for a future update, thanks!

Original comment by roman.nurik on 13 Feb 2013 at 12:25

GoogleCodeExporter commented 9 years ago

Original comment by roman.nurik on 13 Feb 2013 at 7:42

GoogleCodeExporter commented 9 years ago
Could that single PendingIntent be a broadcast PI and then proxy out to the 
final Intent? It might mean adding another field to ExtensionData to determine 
its launch mode.

Original comment by keyboa...@gmail.com on 14 Feb 2013 at 7:26

GoogleCodeExporter commented 9 years ago
See pull request in Issue 115

Original comment by keyboa...@gmail.com on 14 Feb 2013 at 10:16

GoogleCodeExporter commented 9 years ago
No, because the lock screen treats PendingIntent.getActivity differently from 
PendingIntent.getBroadcast. In the original codebase we used broadcasts but 
this led to very undesirable lockscreen behavior.

Original comment by roman.nurik on 14 Feb 2013 at 10:29

GoogleCodeExporter commented 9 years ago
I don't think ScrollView is remotable, so I'm not sure how that would work.

Original comment by keyboa...@gmail.com on 14 Feb 2013 at 11:30

GoogleCodeExporter commented 9 years ago
Ah, dang, you're right :( I forgot about that.

Original comment by roman.nurik on 15 Feb 2013 at 12:28

GoogleCodeExporter commented 9 years ago
With PendingIntent we could use TaskStackBuilder 
(https://developer.android.com/reference/android/app/TaskStackBuilder.html) to 
launch a whole Task of Activities.
And I need this feature for my extension ...

Original comment by GuillaumeBOUERAT on 15 Apr 2013 at 1:30