Where is the code that is launching SmsFlood from?

I have never done anything with custom permissions so I may be wrong but I
think the fact that it says it is starting the intent "from null" may be the
cause of the problem...

Thanks,
Justin

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Thu, Nov 26, 2009 at 7:22 PM, Taylor Perkins <[email protected]> wrote:

> 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?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en

Reply via email to