Still trying to get my head around permissions - can anybody help?

by Mark H. Nichols » Wed, 16 Jun 2010 08:14:40 GMT

Sponsored Links

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 

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?


Still trying to get my head around permissions - can anybody help?

by Richard C. Cox » Thu, 17 Jun 2010 03:54:08 GMT

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




Sponsored Links

Other Threads

1. Dynamic table

I am trying to add rows to a table dynamically at runtime.  The code
below shows how I am going about doing that.  The page loads without
any errors but there are no rows except the one added in the XML.  Can
somebody point out what I am doing wrong here?

public void onCreate(Bundle savedInstanceState) {
        TableLayout table = (TableLayout)findViewById
        TableRow row = null;
        TextView label = null;
        Button button = null;
        for (int i = 0; i < 3; i++){
                row = new TableRow(this);
                label = new TextView(this);
                label.setText("label " + i);
                label.setLayoutParams(new LayoutParams
(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
                button = new Button(this);
                button.setText("button " + i);
                button.setLayoutParams(new LayoutParams
(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

The XML for the layout is as follows.

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="
                <TextView android:id="@+id/labels"
                <TextView android:id="@+id/buttons"


2. where is the ADT Plugin (sdk-windows-1.1_r1\) for Eclipse?

The instructions to Installing the ADT Plugin for Eclipse refer to an
invalid location.

The instructions are available under:

And the invalid locations it referring to download the ADT plug-in

Any idea on the appropriate location to get the ADT plug-in from?



3. Ideas to enhance the Android Platform

4. playing video from browser in android running on beagle board

5. Fw:problem with porting media player to real hardware

6. How to access the page which need user name and password

7. How to use fprintf() for stdout/stderr on Android v1.1 SDK Release 1?