aboutsummaryrefslogtreecommitdiff
path: root/src/main/AndroidManifest.xml
diff options
context:
space:
mode:
authorarammelk <arammelk@gmail.com>2017-07-24 18:52:36 -0700
committerDavid T.H. Kao <dthkao@gmail.com>2017-07-24 18:52:36 -0700
commit4dbbe064143465c11a5bd0e78386bf6f06532934 (patch)
tree723f613b938e5dbea81fc508ac9c8d3f9f4d2c9f /src/main/AndroidManifest.xml
parent3b48f2df00a2204e9ce3cba7ec538d4097e42018 (diff)
downloadmobly-bundled-snippets-4dbbe064143465c11a5bd0e78386bf6f06532934.tar.gz
Add SMS snippet (#69)
* add sms snippet * Remove unnecessary sleep * Add missing copyright to IncomingSmsBroadcastReceiver * Add sent confirmation for sendSms, this makes it an AsyncRpc. - Added OutboundSmsReceiver to post events when SMS are send action is done. Posts error back if action is not successful. Also wait for all parts of a multipart message to be sent before posting event. Example usage now: event = s.sendSms('+15555678912', 'message message message').waitAndGet('SentSms') - Renamed IncomingSmsBroardcastReceiver to SmsReceiver and make it a private class of SmsSnippet. Converted sendSms to AsyncRpc so it will post event back when message is sent * Add sent confirmation for sendSms, this makes it an AsyncRpc. - Added OutboundSmsReceiver to post events when SMS are send action is done. Posts error back if action is not successful. Also wait for all parts of a multipart message to be sent before posting event. Example usage now: event = s.sendSms('+15555678912', 'message message message').waitAndGet('SentSms') - Renamed IncomingSmsBroardcastReceiver to SmsReceiver and make it a private class of SmsSnippet. Converted sendSms to AsyncRpc so it will post event back when message is sent * Cleanup naming * Align event key names with Java object property names. * Use EventCache + built in mobly SnippetEvents to wait for SMS sent confirmation. This shares code with EventSnippet in Mobly Snippet Lib. I'm not sure what the accepted practice is for sharing code across github projects? Should I refactor some of the event code in Mobly Bundle Lib into EventUtils, then use that in Mobly Bundled Snippets to avoid duplicating this? I still want to check this is in as is, to have a working version earlier. * Return data from event instead of fulll SnippetEvent. This way it works like so: >>> result = s.sendSms("15551234567", "Hello world") >>> pprint.pprint(result) {u'sent': True} >>> * throw exception on error instead and some javadocs. * cleanup
Diffstat (limited to 'src/main/AndroidManifest.xml')
-rw-r--r--src/main/AndroidManifest.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index 1f6744b..7651182 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -17,10 +17,13 @@
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
+ <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
+ <uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
+ <uses-permission android:name="android.permission.SEND_SMS" />
<application>
<meta-data
android:name="mobly-snippets"
@@ -34,6 +37,7 @@
com.google.android.mobly.snippet.bundled.MediaSnippet,
com.google.android.mobly.snippet.bundled.NotificationSnippet,
com.google.android.mobly.snippet.bundled.TelephonySnippet,
+ com.google.android.mobly.snippet.bundled.SmsSnippet,
com.google.android.mobly.snippet.bundled.WifiManagerSnippet" />
</application>