From fe23a4463e35992598c469d0543f4d13247dbcc2 Mon Sep 17 00:00:00 2001 From: Tejas Khorana Date: Thu, 21 Jul 2016 00:28:22 -0700 Subject: Test Applications Demonstrating Push API Applications that demonstrate the usage of Push API. Change-Id: I4a2ace230d7ac7f699c998c0df96cf95f2e85a85 --- apps/PushApiAuthenticator/Android.mk | 18 ++ apps/PushApiAuthenticator/AndroidManifest.xml | 41 ++++ apps/PushApiAuthenticator/res/drawable/push.png | Bin 0 -> 31299 bytes .../res/layout/activity_main.xml | 246 +++++++++++++++++++++ .../res/xml/auth_account_preferences.xml | 45 ++++ .../PushApiAuthenticator/res/xml/authenticator.xml | 25 +++ .../android/pushapiauthenticator/MainActivity.java | 217 ++++++++++++++++++ .../MyAccountAuthenticator.java | 69 ++++++ .../MyAccountAuthenticatorService.java | 32 +++ apps/PushApiTestAppOne/Android.mk | 18 ++ apps/PushApiTestAppOne/AndroidManifest.xml | 37 ++++ apps/PushApiTestAppOne/res/drawable/push.png | Bin 0 -> 31299 bytes .../PushApiTestAppOne/res/layout/activity_main.xml | 92 ++++++++ .../android/pushapithirdpartyone/MainActivity.java | 112 ++++++++++ .../pushapithirdpartyone/MessageReceiver.java | 31 +++ apps/PushApiTestAppTwo/Android.mk | 18 ++ apps/PushApiTestAppTwo/AndroidManifest.xml | 37 ++++ apps/PushApiTestAppTwo/res/drawable/push.png | Bin 0 -> 31299 bytes .../PushApiTestAppTwo/res/layout/activity_main.xml | 106 +++++++++ .../android/pushapithirdpartytwo/MainActivity.java | 116 ++++++++++ .../pushapithirdpartytwo/MessageReceiver.java | 31 +++ 21 files changed, 1291 insertions(+) create mode 100644 apps/PushApiAuthenticator/Android.mk create mode 100644 apps/PushApiAuthenticator/AndroidManifest.xml create mode 100644 apps/PushApiAuthenticator/res/drawable/push.png create mode 100644 apps/PushApiAuthenticator/res/layout/activity_main.xml create mode 100644 apps/PushApiAuthenticator/res/xml/auth_account_preferences.xml create mode 100644 apps/PushApiAuthenticator/res/xml/authenticator.xml create mode 100644 apps/PushApiAuthenticator/src/com/example/android/pushapiauthenticator/MainActivity.java create mode 100644 apps/PushApiAuthenticator/src/com/example/android/pushapiauthenticator/MyAccountAuthenticator.java create mode 100644 apps/PushApiAuthenticator/src/com/example/android/pushapiauthenticator/MyAccountAuthenticatorService.java create mode 100644 apps/PushApiTestAppOne/Android.mk create mode 100644 apps/PushApiTestAppOne/AndroidManifest.xml create mode 100644 apps/PushApiTestAppOne/res/drawable/push.png create mode 100644 apps/PushApiTestAppOne/res/layout/activity_main.xml create mode 100644 apps/PushApiTestAppOne/src/com/example/android/pushapithirdpartyone/MainActivity.java create mode 100644 apps/PushApiTestAppOne/src/com/example/android/pushapithirdpartyone/MessageReceiver.java create mode 100644 apps/PushApiTestAppTwo/Android.mk create mode 100644 apps/PushApiTestAppTwo/AndroidManifest.xml create mode 100644 apps/PushApiTestAppTwo/res/drawable/push.png create mode 100644 apps/PushApiTestAppTwo/res/layout/activity_main.xml create mode 100644 apps/PushApiTestAppTwo/src/com/example/android/pushapithirdpartytwo/MainActivity.java create mode 100644 apps/PushApiTestAppTwo/src/com/example/android/pushapithirdpartytwo/MessageReceiver.java diff --git a/apps/PushApiAuthenticator/Android.mk b/apps/PushApiAuthenticator/Android.mk new file mode 100644 index 000000000..8616882b6 --- /dev/null +++ b/apps/PushApiAuthenticator/Android.mk @@ -0,0 +1,18 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := tests + +# Only compile source java files in this apk. +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_PACKAGE_NAME := PushApiAuthenticator + +LOCAL_SDK_VERSION := current + +LOCAL_DEX_PREOPT := false + +include $(BUILD_PACKAGE) + +# Use the following include to make our test apk. +include $(call all-makefiles-under,$(LOCAL_PATH)) \ No newline at end of file diff --git a/apps/PushApiAuthenticator/AndroidManifest.xml b/apps/PushApiAuthenticator/AndroidManifest.xml new file mode 100644 index 000000000..7628a6b68 --- /dev/null +++ b/apps/PushApiAuthenticator/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/PushApiAuthenticator/res/drawable/push.png b/apps/PushApiAuthenticator/res/drawable/push.png new file mode 100644 index 000000000..d34e3360c Binary files /dev/null and b/apps/PushApiAuthenticator/res/drawable/push.png differ diff --git a/apps/PushApiAuthenticator/res/layout/activity_main.xml b/apps/PushApiAuthenticator/res/layout/activity_main.xml new file mode 100644 index 000000000..52c17ea72 --- /dev/null +++ b/apps/PushApiAuthenticator/res/layout/activity_main.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + +