1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2013 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17<manifest xmlns:android="http://schemas.android.com/apk/res/android" 18 package="com.example.android.smssample" 19 android:versionCode="1" 20 android:versionName="1.0" > 21 22 <uses-sdk 23 android:minSdkVersion="10" 24 android:targetSdkVersion="19" /> 25 26 <uses-permission android:name="android.permission.WRITE_SMS" /> 27 <uses-permission android:name="android.permission.READ_SMS" /> 28 <uses-permission android:name="android.permission.SEND_SMS" /> 29 <uses-permission android:name="android.permission.RECEIVE_SMS" /> 30 <uses-permission android:name="android.permission.RECEIVE_MMS" /> 31 <uses-permission android:name="android.permission.WAKE_LOCK" /> 32 33 <application 34 android:allowBackup="true" 35 android:icon="@drawable/ic_launcher" 36 android:label="@string/app_name" 37 android:theme="@style/AppTheme" > 38 39 <activity 40 android:name=".MainActivity" 41 android:label="@string/app_name" 42 android:windowSoftInputMode="stateHidden"> 43 44 <intent-filter> 45 <action android:name="android.intent.action.MAIN" /> 46 <category android:name="android.intent.category.LAUNCHER" /> 47 </intent-filter> 48 49 <intent-filter> 50 <action android:name="android.intent.action.SEND" /> 51 <action android:name="android.intent.action.SENDTO" /> 52 <category android:name="android.intent.category.DEFAULT" /> 53 <category android:name="android.intent.category.BROWSABLE" /> 54 <data android:scheme="sms" /> 55 <data android:scheme="smsto" /> 56 <data android:scheme="mms" /> 57 <data android:scheme="mmsto" /> 58 </intent-filter> 59 60 </activity> 61 62 <!-- BroadcastReceiver that listens for incoming SMS messages --> 63 <!-- Note the use of android:enabled that is linked to a bool. This will mean this receiver 64 is enabled on KitKat devices and above --> 65 <receiver android:name=".receiver.SmsReceiver" 66 android:enabled="@bool/hasKitKat" 67 android:permission="android.permission.BROADCAST_SMS"> 68 69 <!-- KitKat+ SMS received action --> 70 <intent-filter> 71 <action android:name="android.provider.Telephony.SMS_DELIVER" /> 72 </intent-filter> 73 74 </receiver> 75 76 <!-- BroadcastReceiver that listens for incoming SMS messages --> 77 <!-- Note the use of android:enabled that is linked to a bool. This will mean this receiver 78 is enabled on preKitKat devices --> 79 <receiver android:name=".receiver.SmsReceiverLegacy" 80 android:enabled="@bool/preKitKat"> 81 82 <!-- Pre-KitKat SMS received action --> 83 <intent-filter> 84 <action android:name="android.provider.Telephony.SMS_RECEIVED" /> 85 </intent-filter> 86 87 </receiver> 88 89 <!-- BroadcastReceiver that listens for incoming MMS messages --> 90 <!-- Note the use of android:enabled that is linked to a bool. This will mean this receiver 91 is enabled on KitKat devices and above --> 92 <receiver android:name=".receiver.MmsReceiver" 93 android:enabled="@bool/hasKitKat" 94 android:permission="android.permission.BROADCAST_WAP_PUSH"> 95 96 <!-- KitKat+ MMS received action --> 97 <intent-filter> 98 <action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" /> 99 <data android:mimeType="application/vnd.wap.mms-message" /> 100 </intent-filter> 101 102 </receiver> 103 104 <!-- BroadcastReceiver that listens for incoming MMS messages --> 105 <!-- Note the use of android:enabled that is linked to a bool. This will mean this receiver 106 is enabled on preKitKat devices --> 107 <receiver android:name=".receiver.MmsReceiverLegacy" 108 android:enabled="@bool/preKitKat"> 109 110 <!-- Pre-KitKat MMS received action --> 111 <intent-filter> 112 <action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" /> 113 <data android:mimeType="application/vnd.wap.mms-message" /> 114 </intent-filter> 115 116 </receiver> 117 118 <!-- Service that delivers SMS messages received from the phone "quick response" --> 119 <service android:name=".service.RespondService" 120 android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" 121 android:exported="true" > 122 <intent-filter> 123 <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" /> 124 <category android:name="android.intent.category.DEFAULT" /> 125 <data android:scheme="sms" /> 126 <data android:scheme="smsto" /> 127 <data android:scheme="mms" /> 128 <data android:scheme="mmsto" /> 129 </intent-filter> 130 </service> 131 132 <!-- A service used internally to process incoming SMS/MMS --> 133 <service android:name=".service.MessagingService" 134 android:exported="false" /> 135 136 </application> 137 138</manifest> 139