I've been trying to find a way to pass a message to my Wallpaper
Service from a Settings Activity. So basically, click an item in the
Wallpaper settings which will then trigger an Intent in the Wallpaper
service.
In the settings code I do this:
Context context = getApplicationContext();
Intent i = new Intent(context, RainWallpaper.class);
i.setAction("my_action");
context.startService(i);
In my AndroidManifest.xml I have the action in the intent filter
section for the Service
<action android:name="my_action" />
Finally in the WallpaperService I have overridden:
@Override public int onStartCommand(Intent intent, int flags, int
startId)
When I run the code and call StartService I get a security exception.
W/ActivityManager( 2466): Permission Denial: Accessing service
ComponentInfo{com.myclassname} from pid=2466, uid=1000 requires
android.permission.BIND_WALLPAPER
So this seems to say that I need to give the settings dialog
permission to BIND_WALLPAPER. So when I add that permission the
settings dialog now crashes with a security exception.
Justin
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en