Hi Mark,

Thanks for the response.

Yeah, goToSleep may be restricted in the API, but it says nothing about that 
in the SDK Documentation.  I based my assumptions about it being a permission 
issue on a comment I saw over at the Stack Overflow forums.  Somebody mentioned 
that they got a security exception when they tried to call one of the Power 
Manager functions and the response was...it's a level 2 permission, which 
effectively makes it off limits to user programs.

So, I'm not sure.  I guess I was wondering if there was any documentation 
available to definitively states what API object methods an ordinary 3rd party 
application can and can't use.  

Oh, and the app I was writing was a bit of both.  Learning the API and trying 
some practical code bits to see what my app can and can't do.  

Regards,

Richard

> Richard,
> 
> On Jun 15, 2010, at 11:11 AM, Richard C. Cox wrote:
> > I've sent the message numerous times, but I assume it's being moderated
> > from some reason.  I'll try again:
> > 
> > I'm not sure if I completely grasp the Android permissions model.  I
> > recently started working on a simple widget to put the phone to sleep. 
> > Of course, it always gets a security exception because an ordinary user
> > app isn't allowed to call the PowerManager method 'goToSleep' because
> > it's requires the 'signature' level permission DEVICE_POWER.  But I
> > could find nowhere in the docs or on Google that officially says that.
> > 
> > Is there some document that lists the permission levels of android
> > platform defined permissions?
> > 
> > Or, am I looking at permissions completely wrong?
> 
> I'm brand new to Android development myself, so I could be completely wrong
> here. I suspect that it isn't a permissions issue as much as it is a
> restrict API issue. As you state above, ordinary applications aren't
> allowed to call the goToSleep().
> 
> What I think you want is the list of restricted API calls, or rather a list
> of the "internal to Google" content providers. By examining the source
> code you could discover these and perhaps utilize them, but at your own
> peril.
> 
> Was a widget to put the phone to sleep a learning exercise or part of an
> application you wanted to develop? Mark

-- 
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

Reply via email to