Use of Intent to Mail, SMS, MMS and Call - Sketchware Codes
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.
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.
Note: Replace all underlined items in above codes with your desired values
- 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
Comments
Post a Comment