Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send fake sms to myself without mobile network usage?

Tags:

android

sms

send

I want to show some information as an sms in my application. But SmsManager and BroadcastReciever can not create sms and notify on phone itself.

How can I send a fake sms to myself programmatically? Any ideas, workarounds or any class for research... ?

Thanks.

like image 450
AdemC Avatar asked May 10 '11 19:05

AdemC


People also ask

How can someone send me a text from my own number?

They've changed (spoofed) the caller ID to look like they're messaging you from your number, but the shock of getting a text from yourself is bound to get your attention — which is what they're after. If you get a text from your own number, it's a scam.

How can I send a text message without mobile number?

Both Google Play and the iOS App Store also have plenty of apps from which you can do some anonymous texting. They include Text Me, Text Free, TextNow, and textPlus. Typically, you can send and receive texts from a number the app assigns you.

How do I send automated text messages to myself?

Sending a text message to yourself is as easy sending one to a friend. All you have to do is open a new blank message and enter your own phone number in the To: field.


1 Answers

PROOF OF CONCEPT

Call SMS list

Intent intent = new Intent("android.intent.action.MAIN");
        intent.setComponent(
            new ComponentName("com.android.mms","com.android.mms.ui.ConversationList"));
        startActivity(intent);

READ SMS

cursor c= getContentResolver().query(uri, null, null ,null,null); 
        startManagingCursor(c);
        c.moveToFirst();  

            String body = c.getString(c.getColumnIndexOrThrow("body")).toString();
            String number = c.getString(c.getColumnIndexOrThrow("address")).toString();

        c.close(); 

        Toast.makeText(getApplicationContext(), number, Toast.LENGTH_LONG).show();

Write SMS

ContentValues values = new ContentValues();
        values.put("address", "SENDER");
        values.put("body", "foo bar");
        getContentResolver().insert(Uri.parse("content://sms/inbox"), values);

MANIFEST

<uses-permission android:name="android.permission.WRITE_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>

ISSUE There is no event after that therefore android doesnt known if there is some new message.

like image 85
Mertuarez Avatar answered Sep 27 '22 18:09

Mertuarez