Use of Intent to Mail, SMS, MMS and Call

In Sketchware, the uses of Intent activity are limited as it contains only three setAction options: ACTION_VIEW, ACTION_DIAL, and ACTION_CALL.

Here I mention the logic/codes for a few uses of Intent.

1. Open a Url in mobile browser.
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData http://xyz.com
  • StartActivity (name)
2. Open mobile contacts.
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData content://contacts/people/
  • StartActivity (name)
3. Open mobile dialer.
  • Intent (name) setAction ACTION_DIAL
  • Intent (name) setData tel:894......
  • StartActivity (name)
Also,
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData tel:894......
  • StartActivity (name)
4. Call a number.
  • Intent (name) setAction ACTION_CALL
  • Intent (name) setData tel:894......
  • StartActivity (name)
5. Send Email.
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData mailto:myname@gmail.com
  • Intent (name) putExtra key subject value write your subject
  • Intent (name) putExtra key body value write your message which is to be mailed
  • StartActivity (name)
6. Send SMS.
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData smsto:894......
  • Intent (name) putExtra key sms_body value write your message which is to be sent as sms
  • StartActivity (name)
7. Send MMS.
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData mmsto:894......
  • Intent (name) putExtra key subject value write subject of your mms message
  • Intent (name) putExtra key EXTRA_STREAM value /sdcard/Coolpad/Screenshots/Screenshot_2017-07-20-19-03-53.png
  • StartActivity (name)

Note: Replace all underlined items in above codes with your desired values.

There are several other uses of Intent action.

Komentar

Cara pembuatan Apps paling Populer

Create Stopwatch App in Android using Sketchware

TextInputLayout in Sketchware

How to find and​ highlight a word in a text field in Sketchware?

A Flash Light App in Sketchware

How to enable download in webview in Sketchware apps?

Intent - Open File By Type

Code for implementing Notifications in Sketchware

How to share an image from Drawable folder?

ActionBar back button

Animation Transtition Animation