Neither user nor current process has android.permission.SET_PREFERRED_APPLICATIONS

by Dianne Hackborn » Fri, 06 Mar 2009 04:13:38 GMT


Sponsored Links
 Ah yeah.  This is either a bug, or just not something that is supported.  We
will change Dialtacs to not use implicit intents for its tabs, since
replacing them just won't work.  This will avoid running into such problems
involving it.





> > 



Neither user nor current process has android.permission.SET_PREFERRED_APPLICATIONS

by Dianne Hackborn » Fri, 06 Mar 2009 07:54:28 GMT


 t is not currently possible to replace tabs across non-trusting .apks --
this would require running the activity of the tab content in a different
process than the containing tab, and we just can't do that right now.

Also there is nothing in the SDK saying that Dialtacts as it stands will
continue to exist in its current form. I would completely expect that other
manufacturers of Android phones will have their own totally different
dialers, with different tabs, or no tabs at all, so replacing the entire UI
is really the only safe thing to do.

As far as permissions, I believe the only special permission Dialtacts has
is for placing emergency calls, so if you wanted to replace it you would
need to have a button to get to the built-in dialer for emergency calls.
Sorry about that, but that's unfortunately a restriction we have to live
with for now.

I think there may also be some private APIs that the current impl uses (such
as maybe showing presence information with contacts) so you wouldn't be able
to write something that is functionality identical to the standard one.
This is also somewhat the nature of the beast -- you can be sure that
various manufacturers will do exended dialers with all kinds of hooks into
special parts of their particular device. This is really a UI that is so
fundamental to a lot of the specifics of a particular device that these
things are going to be the case.

We would certainly like to have more extensive facilities for
replacing/customizing the dialer, but I can't tell you what or when that
might be. If there are things you see that can help, we would welcome
patches.

On Thu, Mar 5, 2009 at 1:14 PM, MakeMobile
<makemobileinnovati...@gmail.com>wrote:



--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support. All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. connecting to remote database

Hi,

I am new in android as well as java programming. I need to develop an
application which will be able to get the information from a webpage
(php page) and use the information in the android app. I write a
simple android app but it doesnt work. Can anyone help me with this?
or give me some guidance?

php part is just echo a string "This is my string";

android part:
public class HelloAndroid extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
                String a;
                a = callWebPage(
                                
"http://www.uploadhub.com/mobile9/gallery/gallery_android/",
                                "?str=helloWorld");
                super.onCreate(savedInstanceState);
                TextView tv = new TextView(this);
                tv.setText(a);
                setContentView(tv);
        }

        public String callWebPage(String URLstring, String parameters) {
                try {
                        URL url = new URL(URLstring + parameters);
                        URLConnection conn = url.openConnection();
                        // Get the response
                        BufferedReader rd = new BufferedReader(new 
InputStreamReader(conn
                                        .getInputStream()));
                        while ((s = rd.readLine()) != null) {
                                return s;
                        }
                } catch (Exception e) {
                        Log.e("SettingsDialog", "exception in callWebPage");
                }
                return "error";
        }
}

*it always return "error";

-- 

2. Android Manifest Error, and SMS Sending Program.

Hey guys,

I'm getting the following errors

[2009-11-26 21:16:42 - SmsFlood]ActivityManager: Starting: Intent
{ cmp=com.hwrdprkns/.SmsFlood }
[2009-11-26 21:16:42 - SmsFlood]ActivityManager:
java.lang.SecurityException: Permission Denial: starting Intent
{ flg=0x10000000 cmp=com.hwrdprkns/.SmsFlood } from null (pid=-1,
uid=-1) requires com.hwrdprkns.ACCESS_CHECKIN_PROPERTIES


with the following code

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.hwrdprkns"
      android:versionCode="1"
      android:versionName="1.0">
      <permission       android:protectionLevel = "dangerous"
                                android:name = "com.hwrdprkns.SEND_SMS"
                                android:permission =
"com.hwrdprkns.ACCESS_CHECKIN_PROPERTIES"
                                android:label = "allow to send sms" >

      </permission>
    <application android:label="@string/app_name"
android:icon="@drawable/smsflood">
        <activity android:name=".SmsFlood"
                  android:label="@string/app_name"
 
android:permission="com.hwrdprkns.ACCESS_CHECKIN_PROPERTIES">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
    <uses-sdk android:minSdkVersion="5" />
     <uses-permission
android:name="com.hwrdprkns.ACCESS_CHECKIN_PROPERTIES" />

</manifest>



and for my main program class

package com.hwrdprkns;

import android.app.Activity;
import android.os.Bundle;
import android.widget.*;
import android.telephony.*;
import android.view.*;
import android.view.View.OnClickListener;

public class SmsFlood extends Activity implements OnClickListener {


        TextView phone_number;
        TextView number_messages;
        TextView message;
        TextView sent_confirmed;
        Button Send;
        Button Clear;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        //get all my vars ready
        phone_number = (TextView)this.findViewById(R.id.phone_number);
        number_messages = (TextView)this.findViewById
(R.id.number_messages);
        message = (TextView)this.findViewById(R.id.message);
        sent_confirmed = (TextView)this .findViewById
(R.id.sent_confirmed);

        Send = (Button)this.findViewById(R.id.send);
        Clear = (Button)this.findViewById(R.id.clear);

        //Add event handler here
        Send.setOnClickListener((OnClickListener) this);
        //Clear.setOnClickListener(this.ClearForm());//Seems not to
like this call to ClearForm()
        }
    public void ClearForm(){
        phone_number.setText("");
        number_messages.setText("");
        message.setText("");
    }
    public void onClick(View v){
        sendMessages();
    }
    protected void sendMessages()
    {
        int number = Integer.parseInt(number_messages.getText().toString
());
        int confirmed_amount = Integer.parseInt(sent_confirmed.getText
().toString());


        for (int x=0;x<number;x++)
        {
                SmsManager sm = SmsManager.getDefault();
                sm.sendTextMessage(phone_number.getText().toString
(),null,message.getText().toString(),null,null);
                confirmed_amount++;
                sent_confirmed.setText(confirmed_amount);

        }

    }
}


Anyone have any Ideas why Im getting those two errors when I have
added those permission to my manifest document?

-- 

3. Eclipse ADT problems

4. How to save Setings

5. Andoid connect to datastore Google App Engine

6. Re-writing TCP-client code to Android

7. ActivityManager: - exec '/system/bin/sh' failed: Bad address (14) -