/*

/*

Quick Message

This script will send a preformatted message to someone.

you will need to install this sweet apk by the dev himself to give the launcher permission to send sms messages

http://www.lightninglauncher.com/permissions//

If your running Marshmallow just installing the apk is not enough there is 1 more step you need to take, go to your device settings and open your application manager press the cog icon on the toolbar and choose app permissions find the sms permission tap it and flick the switch on the new permission and your good to go.

Note: This step will probably be a little diferent on your device but should be nearly the same.

*/

LL.bindClass(“android.net.Uri”);

LL.bindClass(“android.content.Intent”);

LL.bindClass(“java.language.IllegalArgumentException”);

LL.bindClass(“android.telephony.TelephonyManager”);

LL.bindClass(“android.telephony.SmsManager”);

var mctx = LL.getContext();

var num = “######”; // replace with phone#

var message = “This is is a test”; // replace with your message

function check()

{

var service = mctx.getSystemService(Context.TELEPHONY_SERVICE);

// Check if device supports telephony

if (service.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE)

{

alert(“This device doesnt support telephony”);

}

else

{

// continue

}

}

check();

try{

var textMan = SmsManager.getDefault();

textMan.sendTextMessage(num, null, message, null,null);

Android.makeNewToast(“Sent”, false).show();

}catch(e){

alert(e)

}

]]>
« (Previous Post)
(Next Post) »

One Commentto /*

  1. Anonymous says:

    < ![CDATA[

    Xposed and a rooted device is no longer needed thanks to Pierre adding the SEND_SMS permission to the wiki (link is in 1st post)

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *