Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applied Parse Android SDK 1.14.1 #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
<classpathentry kind="src" path="android/src"/>
<classpathentry kind="src" path="android/build/.apt_generated"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/Users/InGrowth/Library/android-sdk-macosx/platforms/android-23/android.jar"/>
<classpathentry kind="lib" path="/Users/InGrowth/Library/android-sdk-macosx/add-ons/addon-google_apis-google-23/libs/maps.jar"/>
<classpathentry kind="lib" path="/Users/InGrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/titanium.jar"/>
<classpathentry kind="lib" path="/Users/InGrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/kroll-common.jar"/>
<classpathentry kind="lib" path="/Users/InGrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/kroll-apt.jar"/>
<classpathentry kind="lib" path="/Users/ingrowth/Library/android-sdk-macosx/platforms/android-23/android.jar"/>
<classpathentry kind="lib" path="/Users/ingrowth/Library/android-sdk-macosx/add-ons/addon-google_apis-google-23/libs/maps.jar"/>
<classpathentry kind="lib" path="/Users/ingrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/titanium.jar"/>
<classpathentry kind="lib" path="/Users/ingrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/kroll-common.jar"/>
<classpathentry kind="lib" path="/Users/ingrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android/kroll-apt.jar"/>
<classpathentry kind="src" path=".apt_generated">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="android/lib/bolts-tasks-1.4.0.jar"/>
<classpathentry kind="lib" path="android/lib/Parse-1.13.0.jar"/>
<classpathentry kind="lib" path="android/lib/ParseInterceptors-0.0.2.jar"/>
<classpathentry kind="lib" path="android/lib/okio-1.11.0.jar"/>
<classpathentry kind="lib" path="android/lib/okhttp-3.6.0.jar"/>
<classpathentry kind="lib" path="android/lib/parse-android-1.14.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
6 changes: 6 additions & 0 deletions android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ If you want to change the background color of the notification circle, override
* The current implementation only works in combination with [Facebook module](https://github.com/appcelerator-modules/ti.facebook) version 5.0.0 provided by [Appcelerator](https://github.com/appcelerator). That Facebook module also has a dependency onto the Boltz framework. Both modules should depend on the same version!

## Changelog
**[v0.15.0](https://github.com/timanrebel/Parse/releases/tag/0.15.0)**
- Applied Parse Android SDK 1.14.1

**[v0.14.1](https://github.com/timanrebel/Parse/releases/tag/0.14.1)**
- Rebuilding for Titanium SDK 6.0.0+

**[v0.13.1](https://github.com/timanrebel/Parse/releases/tag/0.13.1)**
- Add silent push notification (when exist 'content-available' or omitted 'title'&'alert')
- Add notification clear method : notificationClear()
Expand Down
8 changes: 4 additions & 4 deletions android/build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
titanium.platform=/Users/InGrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android
android.platform=/Users/InGrowth/Library/android-sdk-macosx/platforms/android-23
google.apis=/Users/InGrowth/Library/android-sdk-macosx/add-ons/addon-google_apis-google-23
android.ndk=/Users/InGrowth/Library/android-sdk-macosx/ndk-bundle
titanium.platform=/Users/ingrowth/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA/android
android.platform=/Users/ingrowth/Library/android-sdk-macosx/platforms/android-23
google.apis=/Users/ingrowth/Library/android-sdk-macosx/add-ons/addon-google_apis-google-23
android.ndk=/Users/ingrowth/Library/android-sdk-macosx/ndk-bundle
6 changes: 3 additions & 3 deletions android/java-sources.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"/Users/InGrowth/Documents/Projects/Ti-Parse/android/build/generated/java/eu/rebelcorp/parse/ParseBootstrap.java"
"/Users/InGrowth/Documents/Projects/Ti-Parse/android/src/eu/rebelcorp/parse/ParseModule.java"
"/Users/InGrowth/Documents/Projects/Ti-Parse/android/src/eu/rebelcorp/parse/ParseModuleBroadcastReceiver.java"
"/Users/ingrowth/Documents/Projects/Ti-Parse/android/build/generated/java/eu/rebelcorp/parse/ParseBootstrap.java"
"/Users/ingrowth/Documents/Projects/Ti-Parse/android/src/eu/rebelcorp/parse/ParseModule.java"
"/Users/ingrowth/Documents/Projects/Ti-Parse/android/src/eu/rebelcorp/parse/ParseModuleBroadcastReceiver.java"
Binary file removed android/lib/Parse-1.13.0.jar
Binary file not shown.
Binary file removed android/lib/ParseInterceptors-0.0.2.jar
Binary file not shown.
Binary file added android/lib/okhttp-3.6.0.jar
Binary file not shown.
Binary file added android/lib/okio-1.11.0.jar
Binary file not shown.
Binary file added android/lib/parse-android-1.14.1.jar
Binary file not shown.
Binary file modified android/libs/armeabi-v7a/libeu.rebelcorp.parse.so
Binary file not shown.
Binary file modified android/libs/x86/libeu.rebelcorp.parse.so
Binary file not shown.
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 0.14.1
version: 0.15.0
apiversion: 3
description: Titanium module wrapping the Parse Android SDK.
author: Timan Rebel
Expand Down
Binary file removed android/src/eu/rebelcorp/parse/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions android/src/eu/rebelcorp/parse/ParseModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static ParseModule getInstance() {
public void start()
{
setState(STATE_RUNNING);
// Track Push opens
// App opens analytics
ParseAnalytics.trackAppOpenedInBackground(TiApplication.getAppRootOrCurrentActivity().getIntent());
ParseInstallation.getCurrentInstallation().put("androidId", getAndroidId());
ParseInstallation.getCurrentInstallation().saveInBackground(new SaveCallback() {
Expand Down Expand Up @@ -195,7 +195,7 @@ public String getCurrentInstallationId() {
public String getObjectId() {
return ParseInstallation.getCurrentInstallation().getObjectId();
}

@Kroll.method
public void notificationClear() {
TiApplication context = TiApplication.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class ParseModuleBroadcastReceiver extends ParsePushBroadcastReceiver {
@Override
public void onPushOpen(Context context, Intent intent) {
Intent i = context.getPackageManager().getLaunchIntentForPackage(context.getApplicationContext().getPackageName());
// Push open analytics
ParseAnalytics.trackAppOpenedInBackground(intent);

/* Check if the app is running or in background. If not, just start the app and add the
Expand Down Expand Up @@ -71,7 +72,7 @@ public void onPushReceive(Context context, Intent intent) {
super.onPushReceive(context, intent);
return;
}

JSONObject pnData = new JSONObject(intent.getExtras().getString("com.parse.Data"));
KrollDict data = new KrollDict(pnData);

Expand All @@ -83,19 +84,19 @@ public void onPushReceive(Context context, Intent intent) {
}
return;
}

if (ParseModule.getInstance().getState() != ParseModule.STATE_DESTROYED) {
Log.d("onPushReceive", "App is in foreground; trigger event 'notificationreceive'");

try {
try {
ParseModule.getInstance().fireEvent("notificationreceive", data);
} catch (Exception e) {
Log.d("onPushReceive", e.getMessage());
}
} else {
Log.d("onPushReceive", "App is not alive; 'notificationreceive' won't be triggered");
}

// silent push
if (pnData.has("content-available") == false) {
super.onPushReceive(context, intent);
Expand Down
Binary file added eu.rebelcorp.parse-android-0.15.0.zip
Binary file not shown.