├── .gitignore
├── LICENSE
├── README.md
├── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── src
└── main
├── AndroidManifest.xml
├── java
└── com
│ └── anjlab
│ └── android
│ └── smsgateway
│ └── gcm
│ ├── HttpHookIntentService.java
│ ├── MainActivity.java
│ ├── SmsBroadcastReceiver.java
│ ├── SmsIntentService.java
│ └── SmsMessageReceiver.java
└── res
├── drawable-hdpi-v11
└── ic_stat_gcm.png
├── drawable-hdpi-v9
└── ic_stat_gcm.png
├── drawable-hdpi
├── ic_launcher.png
└── ic_stat_gcm.png
├── drawable-ldpi-v11
└── ic_stat_gcm.png
├── drawable-ldpi-v9
└── ic_stat_gcm.png
├── drawable-ldpi
├── ic_launcher.png
└── ic_stat_gcm.png
├── drawable-mdpi-v11
└── ic_stat_gcm.png
├── drawable-mdpi-v9
└── ic_stat_gcm.png
├── drawable-mdpi
├── ic_launcher.png
└── ic_stat_gcm.png
├── drawable-xhdpi-v11
└── ic_stat_gcm.png
├── drawable-xhdpi-v9
└── ic_stat_gcm.png
├── drawable-xhdpi
├── ic_launcher.png
└── ic_stat_gcm.png
├── layout
└── main.xml
└── values
└── strings.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | gen
3 | .project
4 | .classpath
5 | .gradle
6 | build
7 | .DS_Store
8 | .idea
9 | .settings
10 | .metadata
11 | *.iml
12 | local.properties
13 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction, and
10 | distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright
13 | owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all other entities
16 | that control, are controlled by, or are under common control with that entity.
17 | For the purposes of this definition, "control" means (i) the power, direct or
18 | indirect, to cause the direction or management of such entity, whether by
19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20 | outstanding shares, or (iii) beneficial ownership of such entity.
21 |
22 | "You" (or "Your") shall mean an individual or Legal Entity exercising
23 | permissions granted by this License.
24 |
25 | "Source" form shall mean the preferred form for making modifications, including
26 | but not limited to software source code, documentation source, and configuration
27 | files.
28 |
29 | "Object" form shall mean any form resulting from mechanical transformation or
30 | translation of a Source form, including but not limited to compiled object code,
31 | generated documentation, and conversions to other media types.
32 |
33 | "Work" shall mean the work of authorship, whether in Source or Object form, made
34 | available under the License, as indicated by a copyright notice that is included
35 | in or attached to the work (an example is provided in the Appendix below).
36 |
37 | "Derivative Works" shall mean any work, whether in Source or Object form, that
38 | is based on (or derived from) the Work and for which the editorial revisions,
39 | annotations, elaborations, or other modifications represent, as a whole, an
40 | original work of authorship. For the purposes of this License, Derivative Works
41 | shall not include works that remain separable from, or merely link (or bind by
42 | name) to the interfaces of, the Work and Derivative Works thereof.
43 |
44 | "Contribution" shall mean any work of authorship, including the original version
45 | of the Work and any modifications or additions to that Work or Derivative Works
46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work
47 | by the copyright owner or by an individual or Legal Entity authorized to submit
48 | on behalf of the copyright owner. For the purposes of this definition,
49 | "submitted" means any form of electronic, verbal, or written communication sent
50 | to the Licensor or its representatives, including but not limited to
51 | communication on electronic mailing lists, source code control systems, and
52 | issue tracking systems that are managed by, or on behalf of, the Licensor for
53 | the purpose of discussing and improving the Work, but excluding communication
54 | that is conspicuously marked or otherwise designated in writing by the copyright
55 | owner as "Not a Contribution."
56 |
57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58 | of whom a Contribution has been received by Licensor and subsequently
59 | incorporated within the Work.
60 |
61 | 2. Grant of Copyright License.
62 |
63 | Subject to the terms and conditions of this License, each Contributor hereby
64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
65 | irrevocable copyright license to reproduce, prepare Derivative Works of,
66 | publicly display, publicly perform, sublicense, and distribute the Work and such
67 | Derivative Works in Source or Object form.
68 |
69 | 3. Grant of Patent License.
70 |
71 | Subject to the terms and conditions of this License, each Contributor hereby
72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
73 | irrevocable (except as stated in this section) patent license to make, have
74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where
75 | such license applies only to those patent claims licensable by such Contributor
76 | that are necessarily infringed by their Contribution(s) alone or by combination
77 | of their Contribution(s) with the Work to which such Contribution(s) was
78 | submitted. If You institute patent litigation against any entity (including a
79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a
80 | Contribution incorporated within the Work constitutes direct or contributory
81 | patent infringement, then any patent licenses granted to You under this License
82 | for that Work shall terminate as of the date such litigation is filed.
83 |
84 | 4. Redistribution.
85 |
86 | You may reproduce and distribute copies of the Work or Derivative Works thereof
87 | in any medium, with or without modifications, and in Source or Object form,
88 | provided that You meet the following conditions:
89 |
90 | You must give any other recipients of the Work or Derivative Works a copy of
91 | this License; and
92 | You must cause any modified files to carry prominent notices stating that You
93 | changed the files; and
94 | You must retain, in the Source form of any Derivative Works that You distribute,
95 | all copyright, patent, trademark, and attribution notices from the Source form
96 | of the Work, excluding those notices that do not pertain to any part of the
97 | Derivative Works; and
98 | If the Work includes a "NOTICE" text file as part of its distribution, then any
99 | Derivative Works that You distribute must include a readable copy of the
100 | attribution notices contained within such NOTICE file, excluding those notices
101 | that do not pertain to any part of the Derivative Works, in at least one of the
102 | following places: within a NOTICE text file distributed as part of the
103 | Derivative Works; within the Source form or documentation, if provided along
104 | with the Derivative Works; or, within a display generated by the Derivative
105 | Works, if and wherever such third-party notices normally appear. The contents of
106 | the NOTICE file are for informational purposes only and do not modify the
107 | License. You may add Your own attribution notices within Derivative Works that
108 | You distribute, alongside or as an addendum to the NOTICE text from the Work,
109 | provided that such additional attribution notices cannot be construed as
110 | modifying the License.
111 | You may add Your own copyright statement to Your modifications and may provide
112 | additional or different license terms and conditions for use, reproduction, or
113 | distribution of Your modifications, or for any such Derivative Works as a whole,
114 | provided Your use, reproduction, and distribution of the Work otherwise complies
115 | with the conditions stated in this License.
116 |
117 | 5. Submission of Contributions.
118 |
119 | Unless You explicitly state otherwise, any Contribution intentionally submitted
120 | for inclusion in the Work by You to the Licensor shall be under the terms and
121 | conditions of this License, without any additional terms or conditions.
122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of
123 | any separate license agreement you may have executed with Licensor regarding
124 | such Contributions.
125 |
126 | 6. Trademarks.
127 |
128 | This License does not grant permission to use the trade names, trademarks,
129 | service marks, or product names of the Licensor, except as required for
130 | reasonable and customary use in describing the origin of the Work and
131 | reproducing the content of the NOTICE file.
132 |
133 | 7. Disclaimer of Warranty.
134 |
135 | Unless required by applicable law or agreed to in writing, Licensor provides the
136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
138 | including, without limitation, any warranties or conditions of TITLE,
139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
140 | solely responsible for determining the appropriateness of using or
141 | redistributing the Work and assume any risks associated with Your exercise of
142 | permissions under this License.
143 |
144 | 8. Limitation of Liability.
145 |
146 | In no event and under no legal theory, whether in tort (including negligence),
147 | contract, or otherwise, unless required by applicable law (such as deliberate
148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be
149 | liable to You for damages, including any direct, indirect, special, incidental,
150 | or consequential damages of any character arising as a result of this License or
151 | out of the use or inability to use the Work (including but not limited to
152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or
153 | any and all other commercial damages or losses), even if such Contributor has
154 | been advised of the possibility of such damages.
155 |
156 | 9. Accepting Warranty or Additional Liability.
157 |
158 | While redistributing the Work or Derivative Works thereof, You may choose to
159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or
160 | other liability obligations and/or rights consistent with this License. However,
161 | in accepting such obligations, You may act only on Your own behalf and on Your
162 | sole responsibility, not on behalf of any other Contributor, and only if You
163 | agree to indemnify, defend, and hold each Contributor harmless for any liability
164 | incurred by, or claims asserted against, such Contributor by reason of your
165 | accepting any such warranty or additional liability.
166 |
167 | END OF TERMS AND CONDITIONS
168 |
169 | APPENDIX: How to apply the Apache License to your work
170 |
171 | To apply the Apache License to your work, attach the following boilerplate
172 | notice, with the fields enclosed by brackets "[]" replaced with your own
173 | identifying information. (Don't include the brackets!) The text should be
174 | enclosed in the appropriate comment syntax for the file format. We also
175 | recommend that a file or class name and description of purpose be included on
176 | the same "printed page" as the copyright notice for easier identification within
177 | third-party archives.
178 |
179 | Copyright [yyyy] [name of copyright owner]
180 |
181 | Licensed under the Apache License, Version 2.0 (the "License");
182 | you may not use this file except in compliance with the License.
183 | You may obtain a copy of the License at
184 |
185 | http://www.apache.org/licenses/LICENSE-2.0
186 |
187 | Unless required by applicable law or agreed to in writing, software
188 | distributed under the License is distributed on an "AS IS" BASIS,
189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190 | See the License for the specific language governing permissions and
191 | limitations under the License.
192 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Android SMS Gateway Application
2 | ===============
3 |
4 | This is a simple and small application that translates Google Cloud Messaging (GCM) events into outgoing SMS messages on your phone.
5 |
6 | Getting Started
7 | ===============
8 | * Follow the instructions gescribed at http://developer.android.com/google/gcm/gs.html to create your GCM Sender ID (Project ID) and API Key.
9 | * Build application from the source code using Eclipse or download it from the Releases section of this project.
10 | * Install it and launch on your phone. Put in your Sender ID and save a Registration ID so you can use it from your web app (or something).
11 | * Set up you backend application as it described below
12 |
13 | Setting up your backend application
14 | ===============
15 |
16 | To send messages you will need to do a HTTP POST to https://android.googleapis.com/gcm/send as it described here:
17 | http://developer.android.com/google/gcm/http.html
18 |
19 | Make sure you send API key from your Google Console within `Authorization` header and the `registration_id` value saved from your phone withing post body.
20 |
21 | Here is a small sample witten in ruby:
22 | ```ruby
23 | require 'mechanize'
24 |
25 | @agent = Mechanize.new
26 |
27 | @agent.post 'https://android.googleapis.com/gcm/send',
28 | {
29 | 'registration_id' => 'YOUR REGISTRATION ID VALUE',
30 | 'data.message' => 'YOUR MESSAGE HERE',
31 | 'data.number' => 'DESTINATION PHONE NUMBER HERE'
32 | },
33 | {
34 | 'Authorization' => 'key=YOUR API KEY HERE'
35 | }
36 | ```
37 | **That's it! Make sure you have enough credits on your phone to send text messages :)**
38 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | buildscript {
4 | repositories {
5 | mavenCentral()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.0'
9 | }
10 | }
11 |
12 | repositories {
13 | mavenCentral()
14 | }
15 |
16 | dependencies {
17 | compile 'com.google.android.gms:play-services:3.1.36'
18 | compile 'com.android.support:support-v4:19.0.0'
19 | compile 'com.jakewharton:butterknife:6.1.0'
20 | }
21 |
22 | android {
23 | compileSdkVersion 22
24 | buildToolsVersion "22.0.1"
25 |
26 | defaultConfig {
27 | minSdkVersion 10
28 | targetSdkVersion 22
29 | }
30 |
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_1_7
33 | targetCompatibility JavaVersion.VERSION_1_7
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Oct 26 17:12:01 MSK 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file is automatically generated by Android Studio.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 | #
7 | # Location of the SDK. This is only used by Gradle.
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | #Mon Oct 26 18:02:23 MSK 2015
11 | sdk.dir=/Users/sergeyglukhov/android-sdk
12 |
--------------------------------------------------------------------------------
/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/main/java/com/anjlab/android/smsgateway/gcm/HttpHookIntentService.java:
--------------------------------------------------------------------------------
1 | package com.anjlab.android.smsgateway.gcm;
2 |
3 | import android.app.IntentService;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 |
7 | import java.io.BufferedWriter;
8 | import java.io.OutputStream;
9 | import java.io.OutputStreamWriter;
10 | import java.net.HttpURLConnection;
11 | import java.net.URL;
12 | import java.net.URLEncoder;
13 |
14 | public class HttpHookIntentService extends IntentService {
15 | public static final String URL = "url";
16 | public static final String TEXT = "text";
17 | public static final String SENDER = "sender";
18 |
19 | public HttpHookIntentService() {
20 | super("HttpHookIntentService");
21 | }
22 |
23 | @Override
24 | protected void onHandleIntent(Intent intent) {
25 | Bundle extras = intent.getExtras();
26 |
27 | try
28 | {
29 | java.net.URL url = new URL(extras.getString(URL));
30 | HttpURLConnection conn = (HttpURLConnection) url.openConnection();
31 | conn.setReadTimeout(10000);
32 | conn.setConnectTimeout(15000);
33 | conn.setRequestMethod("POST");
34 | conn.setDoInput(true);
35 | conn.setDoOutput(true);
36 |
37 | OutputStream os = conn.getOutputStream();
38 | BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));
39 | writer.write(String.format("content=%s&from_number=%s",
40 | URLEncoder.encode(extras.getString(TEXT), "UTF-8"),
41 | extras.getString(SENDER)));
42 | writer.flush();
43 | writer.close();
44 | os.close();
45 | conn.getInputStream().close();
46 | }
47 | catch (Exception e)
48 | {
49 | e.printStackTrace();
50 | }
51 |
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/main/java/com/anjlab/android/smsgateway/gcm/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.anjlab.android.smsgateway.gcm;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.content.pm.PackageManager.NameNotFoundException;
8 | import android.os.AsyncTask;
9 | import android.os.Bundle;
10 | import android.text.TextUtils;
11 | import android.util.Log;
12 | import android.view.View;
13 | import android.view.WindowManager;
14 | import android.widget.Button;
15 | import android.widget.CheckBox;
16 | import android.widget.EditText;
17 | import android.widget.TextView;
18 |
19 | import com.google.android.gms.common.ConnectionResult;
20 | import com.google.android.gms.common.GooglePlayServicesUtil;
21 | import com.google.android.gms.gcm.GoogleCloudMessaging;
22 |
23 | import java.io.IOException;
24 |
25 | import butterknife.ButterKnife;
26 | import butterknife.InjectView;
27 |
28 | public class MainActivity extends Activity
29 | {
30 |
31 | public static final String PROPERTY_REG_ID = "registration_id";
32 | public static final String PROPERTY_SENDER_ID = "sender_id";
33 | private static final String PROPERTY_APP_VERSION = "app_version";
34 | public static final String PROPERTY_FORWARD_ENABLED = "forwarding_enabled";
35 | public static final String PROPERTY_FORWARD_URL = "forwarding_url";
36 | static final String TAG = "SMS Gateway";
37 |
38 | @InjectView(R.id.send)
39 | Button send;
40 |
41 | @InjectView(R.id.saveProjectId)
42 | Button saveProjectId;
43 |
44 | @InjectView(R.id.saveForwarning)
45 | Button saveForwarning;
46 |
47 | @InjectView(R.id.display)
48 | TextView display;
49 |
50 | @InjectView(R.id.senderIdInputView)
51 | EditText senderId;
52 |
53 | @InjectView(R.id.forwardingUrlInputView)
54 | EditText forwardingUrl;
55 |
56 | @InjectView(R.id.forwardingEnabled)
57 | CheckBox forwardingEnabled;
58 |
59 | @InjectView(R.id.senderIdPanel)
60 | View senderIdPanel;
61 |
62 | GoogleCloudMessaging gcm;
63 |
64 | @Override
65 | public void onCreate(Bundle savedInstanceState)
66 | {
67 | super.onCreate(savedInstanceState);
68 |
69 | setContentView(R.layout.main);
70 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
71 |
72 | ButterKnife.inject(this);
73 |
74 | send.setOnClickListener(new View.OnClickListener()
75 | {
76 |
77 | @Override
78 | public void onClick(View v)
79 | {
80 | Intent intent = new Intent(Intent.ACTION_SEND);
81 | intent.setType("text/plain");
82 | intent.putExtra(Intent.EXTRA_SUBJECT, "Your Android SMS Gateway Registration ID");
83 | intent.putExtra(Intent.EXTRA_TEXT, getRegistrationId());
84 | startActivity(Intent.createChooser(intent, "Send Email"));
85 | }
86 | });
87 | saveProjectId.setOnClickListener(new View.OnClickListener()
88 | {
89 |
90 | @Override
91 | public void onClick(View v)
92 | {
93 | storeSenderId(senderId.getText().toString());
94 | registerInBackground();
95 | }
96 | });
97 | saveForwarning.setOnClickListener(new View.OnClickListener()
98 | {
99 | @Override
100 | public void onClick(View v)
101 | {
102 | getGcmPreferences()
103 | .edit()
104 | .putString(PROPERTY_FORWARD_URL, forwardingUrl.getText().toString())
105 | .putBoolean(PROPERTY_FORWARD_ENABLED, forwardingEnabled.isChecked())
106 | .apply();
107 | }
108 | });
109 |
110 | forwardingUrl.setText(getForwardingUrl());
111 | forwardingEnabled.setChecked(getForwardingEnabled());
112 |
113 | // Check device for Play Services APK. If check succeeds, proceed with GCM registration.
114 | if (checkPlayServices())
115 | {
116 | gcm = GoogleCloudMessaging.getInstance(this);
117 | if (TextUtils.isEmpty(getRegistrationId()))
118 | {
119 | send.setVisibility(View.INVISIBLE);
120 | display.setText("");
121 | }
122 | else
123 | senderIdPanel.setVisibility(View.GONE);
124 | }
125 | else
126 | {
127 | display.setText(R.string.error_no_play_services);
128 | }
129 | }
130 |
131 | @Override
132 | protected void onResume()
133 | {
134 | super.onResume();
135 |
136 | checkPlayServices();
137 | }
138 |
139 | private boolean checkPlayServices()
140 | {
141 | return GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) == ConnectionResult.SUCCESS;
142 | }
143 |
144 | private void storeRegistrationId(String regId)
145 | {
146 | getGcmPreferences()
147 | .edit()
148 | .putString(PROPERTY_REG_ID, regId)
149 | .putInt(PROPERTY_APP_VERSION, getAppVersion())
150 | .apply();
151 | }
152 |
153 | private String getRegistrationId()
154 | {
155 | SharedPreferences prefs = getGcmPreferences();
156 | String registrationId = prefs.getString(PROPERTY_REG_ID, "");
157 | if (registrationId.length() == 0)
158 | {
159 | Log.i(TAG, "Registration not found.");
160 | return "";
161 | }
162 | // Check if app was updated; if so, it must clear the registration ID
163 | // since the existing regID is not guaranteed to work with the new
164 | // app version.
165 | int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
166 | if (registeredVersion != getAppVersion())
167 | {
168 | Log.i(TAG, "App version changed.");
169 | return "";
170 | }
171 | return registrationId;
172 | }
173 |
174 | private String getSenderId()
175 | {
176 | return getGcmPreferences().getString(PROPERTY_SENDER_ID, "");
177 | }
178 |
179 | private void storeSenderId(String senderId)
180 | {
181 | getGcmPreferences()
182 | .edit()
183 | .putString(PROPERTY_SENDER_ID, senderId)
184 | .apply();
185 | }
186 |
187 | private void registerInBackground()
188 | {
189 | new AsyncTask()
190 | {
191 | @Override
192 | protected String doInBackground(Void... params)
193 | {
194 | try
195 | {
196 | if (gcm == null)
197 | gcm = GoogleCloudMessaging.getInstance(getApplicationContext());
198 | String id = gcm.register(getSenderId());
199 | storeRegistrationId(id);
200 | return "Device registered, Registration ID = " + id;
201 | }
202 | catch (IOException ex)
203 | {
204 | return "Error: " + ex.getMessage();
205 | }
206 | }
207 |
208 | @Override
209 | protected void onPostExecute(final String msg)
210 | {
211 | runOnUiThread(new Runnable()
212 | {
213 |
214 | @Override
215 | public void run()
216 | {
217 | display.setText(msg);
218 | if (!TextUtils.isEmpty(getRegistrationId()))
219 | {
220 | send.setVisibility(View.VISIBLE);
221 | senderIdPanel.setVisibility(View.GONE);
222 | }
223 | }
224 | });
225 | }
226 | }.execute(null, null, null);
227 | }
228 |
229 | private int getAppVersion()
230 | {
231 | try
232 | {
233 | return getApplicationContext()
234 | .getPackageManager()
235 | .getPackageInfo(getApplicationContext().getPackageName(), 0)
236 | .versionCode;
237 | }
238 | catch (NameNotFoundException e)
239 | {
240 | throw new RuntimeException("Could not get package name: " + e);
241 | }
242 | }
243 |
244 | private SharedPreferences getGcmPreferences()
245 | {
246 | return getSharedPreferences(getApplicationContext().getPackageName(), Context.MODE_PRIVATE);
247 | }
248 |
249 | private String getForwardingUrl()
250 | {
251 | return getGcmPreferences().getString(PROPERTY_FORWARD_URL, "");
252 | }
253 |
254 | private boolean getForwardingEnabled()
255 | {
256 | return getGcmPreferences().getBoolean(PROPERTY_FORWARD_ENABLED, false);
257 | }
258 | }
259 |
--------------------------------------------------------------------------------
/src/main/java/com/anjlab/android/smsgateway/gcm/SmsBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | package com.anjlab.android.smsgateway.gcm;
2 |
3 | import android.app.Activity;
4 | import android.content.ComponentName;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.support.v4.content.WakefulBroadcastReceiver;
8 |
9 | public class SmsBroadcastReceiver extends WakefulBroadcastReceiver {
10 |
11 | @Override
12 | public void onReceive(Context context, Intent intent) {
13 | ComponentName comp = new ComponentName(context.getPackageName(), SmsIntentService.class.getName());
14 | startWakefulService(context, (intent.setComponent(comp)));
15 | setResultCode(Activity.RESULT_OK);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/com/anjlab/android/smsgateway/gcm/SmsIntentService.java:
--------------------------------------------------------------------------------
1 | package com.anjlab.android.smsgateway.gcm;
2 |
3 | import android.app.IntentService;
4 | import android.app.NotificationManager;
5 | import android.app.PendingIntent;
6 | import android.content.ContentValues;
7 | import android.content.Context;
8 | import android.content.Intent;
9 | import android.net.Uri;
10 | import android.os.Bundle;
11 | import android.support.v4.app.NotificationCompat;
12 | import android.telephony.SmsManager;
13 | import android.text.TextUtils;
14 | import android.util.Log;
15 |
16 | import com.google.android.gms.gcm.GoogleCloudMessaging;
17 |
18 | import java.util.ArrayList;
19 |
20 | public class SmsIntentService extends IntentService {
21 | public static final int NOTIFICATION_ID = 1;
22 | private NotificationManager mNotificationManager;
23 |
24 | public SmsIntentService() {
25 | super("GcmIntentService");
26 | }
27 | public static final String TAG = "SMS Gateway";
28 |
29 | @Override
30 | protected void onHandleIntent(Intent intent)
31 | {
32 | Bundle extras = intent.getExtras();
33 | GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
34 | String messageType = gcm.getMessageType(intent);
35 |
36 | if (!extras.isEmpty())
37 | {
38 | if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType))
39 | {
40 | String number = extras.getString("number");
41 | String message = extras.getString("message");
42 | if (!TextUtils.isEmpty(number) && !TextUtils.isEmpty(message))
43 | {
44 | try
45 | {
46 | if (!number.startsWith("+"))
47 | {
48 | number = "+" + number;
49 | }
50 | SmsManager smsManager = SmsManager.getDefault();
51 | ArrayList parts = smsManager.divideMessage(message);
52 | if (parts.size() > 1)
53 | {
54 | smsManager.sendMultipartTextMessage(number, null, parts, null, null);
55 | }
56 | else
57 | {
58 | smsManager.sendTextMessage(number, null, message, null, null);
59 | }
60 |
61 | String result = number + ": " + message;
62 | Log.i(TAG, result);
63 |
64 | sendNotification(result);
65 |
66 | ContentValues values = new ContentValues();
67 | values.put("address", number);
68 | values.put("body", message);
69 | getApplicationContext().getContentResolver()
70 | .insert(Uri.parse("content://sms/sent"), values);
71 | }
72 | catch (Exception ex)
73 | {
74 | Log.e(TAG, ex.toString());
75 | }
76 | }
77 | }
78 | }
79 | SmsBroadcastReceiver.completeWakefulIntent(intent);
80 | }
81 |
82 | private void sendNotification(String msg) {
83 | mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
84 |
85 | PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0);
86 |
87 | NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
88 | .setSmallIcon(R.drawable.ic_stat_gcm)
89 | .setContentTitle(getText(R.string.app_name))
90 | .setStyle(new NotificationCompat.BigTextStyle()
91 | .bigText(msg))
92 | .setContentText(msg).setAutoCancel(true);
93 |
94 | mBuilder.setContentIntent(contentIntent);
95 | mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/src/main/java/com/anjlab/android/smsgateway/gcm/SmsMessageReceiver.java:
--------------------------------------------------------------------------------
1 | package com.anjlab.android.smsgateway.gcm;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.telephony.SmsMessage;
8 |
9 | public class SmsMessageReceiver extends BroadcastReceiver
10 | {
11 | private static final String PDUS = "pdus";
12 |
13 | public void onReceive(Context context, Intent intent)
14 | {
15 | SharedPreferences preferences =
16 | context.getSharedPreferences(context.getApplicationContext().getPackageName(),
17 | Context.MODE_PRIVATE);
18 | if (preferences.getBoolean(MainActivity.PROPERTY_FORWARD_ENABLED, false))
19 | {
20 | Object[] pdus = (Object[]) intent.getExtras().get(PDUS);
21 | if (pdus != null && pdus.length > 0)
22 | {
23 | SmsMessage[] messages = new SmsMessage[pdus.length];
24 | for (int i = 0; i < pdus.length; i++)
25 | {
26 | messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
27 | }
28 |
29 | SmsMessage message = messages[0];
30 | String text;
31 | if (messages.length == 1 || message.isReplace())
32 | {
33 | text = message.getDisplayMessageBody();
34 | }
35 | else
36 | {
37 | StringBuilder textBuilder = new StringBuilder();
38 | for (SmsMessage msg : messages)
39 | {
40 | textBuilder.append(msg.getMessageBody());
41 | }
42 | text = textBuilder.toString();
43 | }
44 |
45 | String number = message.getDisplayOriginatingAddress();
46 |
47 | Intent i = new Intent(context, HttpHookIntentService.class);
48 | i.putExtra(HttpHookIntentService.URL,
49 | preferences.getString(MainActivity.PROPERTY_FORWARD_URL, ""));
50 | i.putExtra(HttpHookIntentService.TEXT, text);
51 | i.putExtra(HttpHookIntentService.SENDER, number);
52 | context.startService(i);
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/res/drawable-hdpi-v11/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-hdpi-v11/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-hdpi-v9/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-hdpi-v9/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/main/res/drawable-hdpi/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-hdpi/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-ldpi-v11/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-ldpi-v11/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-ldpi-v9/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-ldpi-v9/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/main/res/drawable-ldpi/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-ldpi/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-mdpi-v11/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-mdpi-v11/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-mdpi-v9/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-mdpi-v9/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/main/res/drawable-mdpi/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-mdpi/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-xhdpi-v11/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-xhdpi-v11/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-xhdpi-v9/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-xhdpi-v9/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/src/main/res/drawable-xhdpi/ic_stat_gcm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anjlab/android-sms-gateway/16378740ff2d2494b08edf78cd4cdf4625dedefe/src/main/res/drawable-xhdpi/ic_stat_gcm.png
--------------------------------------------------------------------------------
/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
18 |
19 |
24 |
25 |
33 |
34 |
45 |
46 |
53 |
54 |
55 |
62 |
63 |
72 |
73 |
74 |
75 |
78 |
79 |
87 |
88 |
97 |
98 |
105 |
106 |
113 |
114 |
115 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Android SMS Gateway
5 | Send Registration ID
6 | You are set up and ready to send text messages!
7 | Save Project ID
8 | Save
9 | Your GSM Project ID:
10 | Forwarding incoming messages
11 | Forwarding enabled
12 | No valid Google Play Services APK found.
13 |
14 |
15 |
--------------------------------------------------------------------------------