Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removing demo app

an improved demo will be added at Stackmob/stackmob-android-starterproject shortly
  • Loading branch information...
commit ad868809917943206a2ce30ecd75e3e68bfc5b05 1 parent 968f44b
@arschles arschles authored
Showing with 4 additions and 953 deletions.
  1. +4 −10 {SDK → }/.classpath
  2. 0  {SDK → }/.project
  3. 0  {SDK → }/AndroidManifest.xml
  4. +0 −23 Demo/.classpath
  5. +0 −40 Demo/.project
  6. +0 −13 Demo/.settings/org.eclipse.jdt.core.prefs
  7. +0 −36 Demo/AndroidManifest.xml
  8. +0 −175 Demo/LICENSE
  9. BIN  Demo/assets/android-facebook-1.4.jar
  10. BIN  Demo/assets/gson-1.7.2.jar
  11. BIN  Demo/assets/scribe-1.2.3.jar
  12. BIN  Demo/assets/signpost-commonshttp4-1.2.1.1.jar
  13. BIN  Demo/assets/signpost-core-1.2.1.1.jar
  14. BIN  Demo/assets/stackmob-java-client-sdk-0.3.0.jar
  15. +0 −13 Demo/default.properties
  16. +0 −40 Demo/proguard.cfg
  17. +0 −12 Demo/project.properties
  18. BIN  Demo/res/drawable-hdpi/icon.png
  19. BIN  Demo/res/drawable-ldpi/icon.png
  20. BIN  Demo/res/drawable-mdpi/icon.png
  21. +0 −83 Demo/res/layout/main.xml
  22. +0 −8 Demo/res/values/strings.xml
  23. +0 −35 Demo/src/com/stackmob/android/demo/C2DMPayloadReceiver.java
  24. +0 −57 Demo/src/com/stackmob/android/demo/C2DMRegistrationIDHolder.java
  25. +0 −40 Demo/src/com/stackmob/android/demo/C2DMRegistrationReceiver.java
  26. +0 −187 Demo/src/com/stackmob/android/demo/StackMobDemoActivity.java
  27. +0 −6 SDK/.settings/org.eclipse.jdt.core.prefs
  28. +0 −175 SDK/LICENSE
  29. 0  {SDK → }/assets/android-facebook-1.4.jar
  30. 0  {SDK → }/assets/gson-1.7.2.jar
  31. 0  {SDK → }/assets/scribe-1.2.3.jar
  32. 0  {SDK → }/assets/signpost-commonshttp4-1.2.1.1.jar
  33. 0  {SDK → }/assets/signpost-core-1.2.1.1.jar
  34. 0  {SDK → }/assets/stackmob-java-client-sdk-0.3.0.jar
  35. 0  {SDK → }/default.properties
  36. 0  {SDK → }/proguard.cfg
  37. 0  {SDK → }/res/drawable-hdpi/icon.png
  38. 0  {SDK → }/res/drawable-ldpi/icon.png
  39. 0  {SDK → }/res/drawable-mdpi/icon.png
  40. 0  {SDK → }/src/com/stackmob/android/sdk/activity/FacebookActivity.java
  41. 0  {SDK → }/src/com/stackmob/android/sdk/activity/TwitterActivity.java
  42. 0  {SDK → }/src/com/stackmob/android/sdk/callback/StackMobFacebookCallback.java
  43. 0  {SDK → }/src/com/stackmob/android/sdk/callback/StackMobTwitterCallback.java
  44. 0  {SDK → }/src/com/stackmob/android/sdk/common/StackMobCommon.java
  45. 0  {SDK → }/src/com/stackmob/android/sdk/util/EnvironmentInfoUtil.java
View
14 SDK/.classpath → .classpath
@@ -1,19 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target/classes" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="src" output="target/android-classes" path="gen">
- <attributes>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
+ <classpathentry kind="lib" path="assets/android-facebook-1.4.jar"/>
<classpathentry kind="lib" path="assets/gson-1.7.2.jar"/>
<classpathentry kind="lib" path="assets/scribe-1.2.3.jar"/>
- <classpathentry kind="lib" path="assets/android-facebook-1.4.jar"/>
<classpathentry kind="lib" path="assets/signpost-commonshttp4-1.2.1.1.jar"/>
<classpathentry kind="lib" path="assets/signpost-core-1.2.1.1.jar"/>
<classpathentry kind="lib" path="assets/stackmob-java-client-sdk-0.3.0.jar"/>
- <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
View
0  SDK/.project → .project
File renamed without changes
View
0  SDK/AndroidManifest.xml → AndroidManifest.xml
File renamed without changes
View
23 Demo/.classpath
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="src" output="target/android-classes" path="gen">
- <attributes>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/classes" path="src">
- <attributes>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" path="SDK_src"/>
- <classpathentry kind="lib" path="assets/gson-1.7.2.jar"/>
- <classpathentry kind="lib" path="assets/scribe-1.2.3.jar"/>
- <classpathentry kind="lib" path="assets/android-facebook-1.4.jar"/>
- <classpathentry kind="lib" path="assets/signpost-commonshttp4-1.2.1.1.jar"/>
- <classpathentry kind="lib" path="assets/signpost-core-1.2.1.1.jar"/>
- <classpathentry kind="lib" path="assets/stackmob-java-client-sdk-0.3.0.jar"/>
- <classpathentry kind="output" path="bin/classes"/>
-</classpath>
View
40 Demo/.project
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>StackMobDemoActivity</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.android.ide.eclipse.adt.ApkBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
- <linkedResources>
- <link>
- <name>SDK_src</name>
- <type>2</type>
- <location>/Users/aaron/code/StackMob_Android/SDK/src</location>
- </link>
- </linkedResources>
-</projectDescription>
View
13 Demo/.settings/org.eclipse.jdt.core.prefs
@@ -1,13 +0,0 @@
-#Wed Oct 12 18:31:21 PDT 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
View
36 Demo/AndroidManifest.xml
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.stackmob.android.demo" android:versionCode="1" android:versionName="1.0">
-
- <permission android:name="com.stackmob.android.demo.permission.C2D_MESSAGE" android:protectionLevel="signature" />
- <uses-permission android:name="com.stackmob.android.demo.permission.C2D_MESSAGE" />
- <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
-
- <application android:icon="@drawable/icon" android:label="@string/app_name">
- <activity android:name=".StackMobDemoActivity"
- android:label="@string/app_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
-
- <!-- receiving the registration ID -->
- <receiver android:name=".C2DMRegistrationReceiver" android:permission="com.google.android.c2dm.permission.SEND">
- <intent-filter>
- <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
- <category android:name="com.stackmob.android.demo" />
- </intent-filter>
- </receiver>
-
- <!-- receiving messages -->
- <receiver android:name=".C2DMPayloadReceiver" android:permission="com.google.android.c2dm.permission.SEND">
- <intent-filter>
- <action android:name="com.google.android.c2dm.intent.RECEIVE" />
- <category android:name="com.stackmob.android.demo" />
- </intent-filter>
- </receiver>
-
- </application>
-</manifest>
View
175 Demo/LICENSE
@@ -1,175 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
View
BIN  Demo/assets/android-facebook-1.4.jar
Binary file not shown
View
BIN  Demo/assets/gson-1.7.2.jar
Binary file not shown
View
BIN  Demo/assets/scribe-1.2.3.jar
Binary file not shown
View
BIN  Demo/assets/signpost-commonshttp4-1.2.1.1.jar
Binary file not shown
View
BIN  Demo/assets/signpost-core-1.2.1.1.jar
Binary file not shown
View
BIN  Demo/assets/stackmob-java-client-sdk-0.3.0.jar
Binary file not shown
View
13 Demo/default.properties
@@ -1,13 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "build.properties", and override values to adapt the script to your
-# project structure.
-
-# Project target.
-target=Google Inc.:Google APIs:8
-android.library.reference.1=../SDK
-android.library=false
View
40 Demo/proguard.cfg
@@ -1,40 +0,0 @@
--optimizationpasses 5
--dontusemixedcaseclassnames
--dontskipnonpubliclibraryclasses
--dontpreverify
--verbose
--optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-
--keep public class * extends android.app.Activity
--keep public class * extends android.app.Application
--keep public class * extends android.app.Service
--keep public class * extends android.content.BroadcastReceiver
--keep public class * extends android.content.ContentProvider
--keep public class * extends android.app.backup.BackupAgentHelper
--keep public class * extends android.preference.Preference
--keep public class com.android.vending.licensing.ILicensingService
-
--keepclasseswithmembernames class * {
- native <methods>;
-}
-
--keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet);
-}
-
--keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet, int);
-}
-
--keepclassmembers class * extends android.app.Activity {
- public void *(android.view.View);
-}
-
--keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
-}
-
--keep class * implements android.os.Parcelable {
- public static final android.os.Parcelable$Creator *;
-}
View
12 Demo/project.properties
@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-
-android.library.reference.1=../SDK
-# Project target.
-target=android-8
View
BIN  Demo/res/drawable-hdpi/icon.png
Deleted file not rendered
View
BIN  Demo/res/drawable-ldpi/icon.png
Deleted file not rendered
View
BIN  Demo/res/drawable-mdpi/icon.png
Deleted file not rendered
View
83 Demo/res/layout/main.xml
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:weightSum="1"
- android:orientation="vertical">
-
- <!-- login & create user -->
- <TextView
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/textView1"
- android:text="User"></TextView>
- <EditText
- android:inputType="text"
- android:layout_height="wrap_content"
- android:id="@+id/username"
- android:layout_width="200dp" android:text="@string/username_field"></EditText>
- <EditText
- android:inputType="textPassword"
- android:layout_height="wrap_content"
- android:id="@+id/password"
- android:layout_width="200dp" android:text="@string/password_field"></EditText>
- <Button
- android:layout_height="wrap_content"
- android:text="Create User"
- android:id="@+id/button1"
- android:layout_weight="0.01"
- android:layout_width="wrap_content"
- android:onClick="createUserClick"></Button>
- <Button
- android:layout_weight="0.01"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:onClick="loginClick"
- android:text="Login"
- android:gravity="center"></Button>
-
- <!-- C2DM -->
- <TextView
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/textView2"
- android:text="Android Push"></TextView>
- <Button android:layout_weight="0.01"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:onClick="getRegTokenClick"
- android:text="Get Stored Registration ID"
- android:gravity="center"></Button>
- <Button android:layout_weight="0.01"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:onClick="forceGetRegTokenClick"
- android:text="Force Get New Registration ID"
- android:gravity="center"></Button>
- <EditText
- android:layout_height="wrap_content"
- android:id="@+id/push_username"
- android:text="@string/username_field"
- android:layout_width="wrap_content"></EditText>
- <Button
- android:layout_weight="0.01"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:onClick="registerRegTokenClick"
- android:text="Register Registration ID With Stackmob"
- android:gravity="center"></Button>
- <EditText android:inputType="text" android:layout_width="200dp" android:layout_height="wrap_content" android:text="@string/data_field" android:id="@+id/token_username">
- <requestFocus></requestFocus>
- </EditText>
- <Button
- android:layout_weight="0.01"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:onClick="sendPushClick"
- android:text="Send Push Message To This Phone"
- android:gravity="center"></Button>
-
-</LinearLayout>
View
8 Demo/res/values/strings.xml
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <string name="hello">Hello World, StackMobDemoActivity!</string>
- <string name="app_name">StackMobDemo</string>
- <string name="username_field">Username</string>
- <string name="password_field">Password</string>
- <string name="data_field">Push Data</string>
-</resources>
View
35 Demo/src/com/stackmob/android/demo/C2DMPayloadReceiver.java
@@ -1,35 +0,0 @@
-/**
- * Copyright 2011 StackMob
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.stackmob.android.demo;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.util.Log;
-
-public class C2DMPayloadReceiver extends BroadcastReceiver {
- private static final String TAG = C2DMPayloadReceiver.class.getCanonicalName();
-
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if ("com.google.android.c2dm.intent.RECEIVE".equals(action)) {
- Log.d(TAG, "Got C2DM message");
- }
- }
-
-}
View
57 Demo/src/com/stackmob/android/demo/C2DMRegistrationIDHolder.java
@@ -1,57 +0,0 @@
-/**
- * Copyright 2011 StackMob
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.stackmob.android.demo;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-
-public class C2DMRegistrationIDHolder {
- public static class NoStoredRegistrationIDException extends Exception {
- private static final long serialVersionUID = -4109182687918155379L;
- public NoStoredRegistrationIDException(String s) {
- super(s);
- }
- }
- private final String TAG = C2DMRegistrationIDHolder.class.getCanonicalName();
- private final String KEY = "registrationID";
-
- private Context context;
- private SharedPreferences prefs;
- public C2DMRegistrationIDHolder(Context ctx) {
- this.context = ctx;
- this.prefs = this.context.getSharedPreferences(TAG, Context.MODE_PRIVATE);
- }
-
- public Boolean hasID() {
- return this.prefs.contains(KEY);
- }
-
- public void setID(String id) {
- SharedPreferences.Editor editor = this.prefs.edit();
- editor.putString(KEY, id);
- editor.commit();
- }
-
- public String getID() throws NoStoredRegistrationIDException {
- String id = this.prefs.getString(KEY, null);
- if(id == null) {
- throw new NoStoredRegistrationIDException("no registration ID was stored in shared prefs");
- }
- return id;
- }
-
-}
View
40 Demo/src/com/stackmob/android/demo/C2DMRegistrationReceiver.java
@@ -1,40 +0,0 @@
-/**
- * Copyright 2011 StackMob
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.stackmob.android.demo;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.util.Log;
-
-public class C2DMRegistrationReceiver extends BroadcastReceiver {
- private static final String TAG = C2DMRegistrationReceiver.class.getCanonicalName();
- private static final String REGISTRATION_ACTION = "com.google.android.c2dm.intent.REGISTRATION";
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (REGISTRATION_ACTION.equals(action)) {
- final String registrationId = intent.getStringExtra("registration_id");
- final String error = intent.getStringExtra("error");
- Log.i(TAG, "Received registration ID " + registrationId + " with error " + error);
-
- //store the registration ID locally
- C2DMRegistrationIDHolder holder = new C2DMRegistrationIDHolder(context);
- holder.setID(registrationId);
- }
- }
-}
View
187 Demo/src/com/stackmob/android/demo/StackMobDemoActivity.java
@@ -1,187 +0,0 @@
-/**
- * Copyright 2011 StackMob
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.stackmob.android.demo;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-
-import com.stackmob.sdk.api.StackMob;
-import com.stackmob.sdk.callback.StackMobCallback;
-import com.stackmob.sdk.exception.StackMobException;
-import com.stackmob.sdk.push.StackMobPushToken;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.Toast;
-import android.widget.EditText;
-import com.stackmob.android.sdk.common.StackMobCommon;
-import android.util.Log;
-import android.app.PendingIntent;
-import android.content.Intent;
-import android.content.Context;
-
-public class StackMobDemoActivity extends Activity {
- private StackMob stackmob;
- private static final String TAG = StackMobDemoActivity.class.getCanonicalName();
- private final StackMobCallback standardToastCallback = new StackMobCallback() {
- @Override public void success(String responseBody) {
- threadAgnosticToast(StackMobDemoActivity.this, "response: " + responseBody, Toast.LENGTH_SHORT);
- Log.i(TAG, "request succeeded with " + responseBody);
- }
- @Override public void failure(StackMobException e) {
- threadAgnosticToast(StackMobDemoActivity.this, "error: " + e.getMessage(), Toast.LENGTH_SHORT);
- Log.i(TAG, "request had exception " + e.getMessage());
- }
- };
-
- public StackMobDemoActivity() {
- StackMobCommon.API_KEY = "YOUR_API_KEY_HERE";
- StackMobCommon.API_SECRET = "YOUR_API_SECRET_HERE";
- StackMobCommon.USER_OBJECT_NAME = "user";
- StackMobCommon.API_VERSION = 0;
- StackMobCommon.API_URL_FORMAT = "127.0.0.1:9090";
- StackMobCommon.PUSH_API_URL_FORMAT = "127.0.0.1:9191";
- stackmob = StackMobCommon.getStackMobInstance();
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- C2DMRegistrationIDHolder regHolder = new C2DMRegistrationIDHolder(this);
- if(regHolder.hasID()) {
- try {
- Log.i(TAG, "registration ID " + regHolder.getID() + " was already stored in shared prefs");
- }
- catch (C2DMRegistrationIDHolder.NoStoredRegistrationIDException e) {
- Log.e(TAG, "failed to get registration ID from shared prefs, even though shared prefs reports that it's there" , e);
- }
- }
- else {
- Log.i(TAG, "registration ID was not already stored in shared prefs. fetching a new one and saving it");
- registerForC2DM();
- }
- }
-
- public void loginClick(View v) {
- Map<String, String> params = new HashMap<String, String>();
- params.put("username", getUsername());
- params.put("password", getPassword());
- stackmob.login(params, standardToastCallback);
- }
-
- public void createUserClick(View v) {
- Map<String, String> params = new HashMap<String, String>();
- params.put("username", getUsername());
- params.put("password", getPassword());
- stackmob.post("user", params, standardToastCallback);
- }
-
- public void registerRegTokenClick(View w) {
- try {
- final String username = getPushUsername();
- final String registrationID = getRegistrationIDHolder().getID();
- stackmob.registerForPushWithUser(username, registrationID, standardToastCallback);
- }
- catch(C2DMRegistrationIDHolder.NoStoredRegistrationIDException e) {
- threadAgnosticToast(StackMobDemoActivity.this, "no registration ID currently stored", Toast.LENGTH_SHORT);
- }
-
- }
-
- public void sendPushClick(View w) {
- try {
- final Map<String, String> payload = new HashMap<String, String>();
- payload.put("payload", getPushPayload());
- final List<StackMobPushToken> tokens = new ArrayList<StackMobPushToken>();
- tokens.add(new StackMobPushToken(getRegistrationIDHolder().getID(), StackMobPushToken.TokenType.Android));
- stackmob.pushToTokens(payload, tokens, standardToastCallback);
- }
- catch(C2DMRegistrationIDHolder.NoStoredRegistrationIDException e) {
- threadAgnosticToast(StackMobDemoActivity.this, "no registration ID currently stored", Toast.LENGTH_SHORT);
- }
- }
-
- public void getRegTokenClick(View w) {
- try {
- threadAgnosticToast(StackMobDemoActivity.this, getRegistrationIDHolder().getID(), Toast.LENGTH_SHORT);
- }
- catch(C2DMRegistrationIDHolder.NoStoredRegistrationIDException e) {
- threadAgnosticToast(StackMobDemoActivity.this, "no registration ID currently stored", Toast.LENGTH_SHORT);
- }
- }
-
- public void forceGetRegTokenClick(View w) {
- registerForC2DM();
- threadAgnosticToast(StackMobDemoActivity.this, "sent intent to get reg ID", Toast.LENGTH_SHORT);
- }
-
- private C2DMRegistrationIDHolder getRegistrationIDHolder() {
- return new C2DMRegistrationIDHolder(StackMobDemoActivity.this);
- }
-
- private void registerForC2DM() {
- Intent intent = new Intent("com.google.android.c2dm.intent.REGISTER");
- intent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));
- intent.putExtra("sender", "aaron@stackmob.com");
- startService(intent);
- }
-
- private EditText getUsernameField() {
- return (EditText)findViewById(R.id.username);
- }
-
- private EditText getPasswordField() {
- return (EditText)findViewById(R.id.password);
- }
-
- private EditText getPushUsernameField() {
- return (EditText)findViewById(R.id.push_username);
- }
-
- private String getUsername() {
- return getUsernameField().getText().toString();
- }
-
- private String getPushUsername() {
- return getPushUsernameField().getText().toString();
- }
-
- private String getPassword() {
- return getPasswordField().getText().toString();
- }
-
- private EditText getPushPayloadField() {
- return (EditText)findViewById(R.id.token_username);
- }
-
- private String getPushPayload() {
- return getPushPayloadField().getText().toString();
- }
-
- private void threadAgnosticToast(final Context ctx, final String txt, final int duration) {
- runOnUiThread(new Runnable() {
- @Override public void run() {
- Toast.makeText(ctx, txt, duration).show();
- }
- });
- }
-}
View
6 SDK/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +0,0 @@
-#Mon Oct 17 18:40:45 PDT 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
View
175 SDK/LICENSE
@@ -1,175 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
View
0  SDK/assets/android-facebook-1.4.jar → assets/android-facebook-1.4.jar
File renamed without changes
View
0  SDK/assets/gson-1.7.2.jar → assets/gson-1.7.2.jar
File renamed without changes
View
0  SDK/assets/scribe-1.2.3.jar → assets/scribe-1.2.3.jar
File renamed without changes
View
0  SDK/assets/signpost-commonshttp4-1.2.1.1.jar → assets/signpost-commonshttp4-1.2.1.1.jar
File renamed without changes
View
0  SDK/assets/signpost-core-1.2.1.1.jar → assets/signpost-core-1.2.1.1.jar
File renamed without changes
View
0  SDK/assets/stackmob-java-client-sdk-0.3.0.jar → assets/stackmob-java-client-sdk-0.3.0.jar
File renamed without changes
View
0  SDK/default.properties → default.properties
File renamed without changes
View
0  SDK/proguard.cfg → proguard.cfg
File renamed without changes
View
0  SDK/res/drawable-hdpi/icon.png → res/drawable-hdpi/icon.png
File renamed without changes
View
0  SDK/res/drawable-ldpi/icon.png → res/drawable-ldpi/icon.png
File renamed without changes
View
0  SDK/res/drawable-mdpi/icon.png → res/drawable-mdpi/icon.png
File renamed without changes
View
0  ...ackmob/android/sdk/activity/FacebookActivity.java → ...ackmob/android/sdk/activity/FacebookActivity.java
File renamed without changes
View
0  ...tackmob/android/sdk/activity/TwitterActivity.java → ...tackmob/android/sdk/activity/TwitterActivity.java
File renamed without changes
View
0  ...ndroid/sdk/callback/StackMobFacebookCallback.java → ...ndroid/sdk/callback/StackMobFacebookCallback.java
File renamed without changes
View
0  ...android/sdk/callback/StackMobTwitterCallback.java → ...android/sdk/callback/StackMobTwitterCallback.java
File renamed without changes
View
0  ...m/stackmob/android/sdk/common/StackMobCommon.java → ...m/stackmob/android/sdk/common/StackMobCommon.java
File renamed without changes
View
0  ...tackmob/android/sdk/util/EnvironmentInfoUtil.java → ...tackmob/android/sdk/util/EnvironmentInfoUtil.java
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.