Git Product home page Git Product logo

parse's People

Contributors

etruta avatar fokkezb avatar gimdongwoo avatar ktorz avatar m1ga avatar timanrebel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parse's Issues

Get Session Token

Hello,

I am implementing Push Notifications and your module has dropped me great. However, I tried to implement it in my Application and gives me the following error:

 DefaultRequestDirector: Authentication error: Unable to answer-to any of These challenges: {}

I see the README to do a process of Authentication, and passed as a parameter the Session Token.

How do I get this Token?

Below is my code in index.js:

    var Parse = require('eu.rebelcorp.parse');
Parse.authenticate('<your session token>');
Parse.start();

// To enable Android Push Notifications
Parse.enablePush();

// Subscribe of unsubscribe to Parse Channels
Parse.subscribeChannel('myCanalMX');

Parse.addEventListener('notificationreceive', function(e) {
    alert("notification: ", JSON.stringify(e));
});

Parse.addEventListener('notificationopen', function(e) {
    alert("notification: ", JSON.stringify(e));
});

Thank you very much in advance and a hug from Mexico

Send UserID on registration

I have cloud code that when a _Installation entry is added/updated it will add the User's ID to a "User" column. It works on IOS because I am creating _Installation object via REST. You can't do this on Android. I don't think your library is sending the request.user object. Can you please add?

Parse.Cloud.beforeSave("_Installation", function(request, response) {
  // request.user is a Parse.User object. It corresponds to the currently logged in user in iOS or Android.
  if(request.user){
    request.object.set("user", { __type: "Pointer", className: "User", objectId: Parse.User.current().id });
  }
  request.object.set("version", "1.0");

  // Proceed with saving the installation.
  response.success();
});

PushNotification not open app

Why when I click on the notification my app doesn't open ?

this is my index.js

Alloy.Globals.Parse.subscribeChannel('prixApp');

Alloy.Globals.Parse.addEventListener('notificationreceive', function(e) {
    console.log("notification: ", JSON.stringify(e));
});

Alloy.Globals.Parse.addEventListener('notificationopen', function(e) {
    Ti.API.log("notification: ", JSON.stringify(e));

    var data = Ti.App.Android.launchIntent.getStringExtra('com.parse.Data');
    if(data) {
        try {
            var json = JSON.parse(data);

            // Now handle the click on the notification
        }
            catch(_e) {}
    }
}); 

and this is my alloy.js

// Parse
Alloy.Globals.Parse = require('eu.rebelcorp.parse');
Alloy.Globals.Parse.start();

I'm something wrong or the app is not suppose to open when I click on the notification ?

Thanks 4.1.0.GA

Installation initialization failed

First of all thank you for your time and effort.

I'm using this module succesfully in Android 4 and 5 but in Android 6 I get an error.
This is the code:

var Parse = require('eu.rebelcorp.parse');

Parse.start();
Parse.addEventListener('notificationreceive', function(e) {
    Ti.API.error("notificationreceive: ", JSON.stringify(e));
});
Parse.addEventListener('notificationopen', function(e) {
    Ti.API.error("notificationreceive: ", JSON.stringify(e));
    alert(e.alert);
});
Parse.addEventListener('installationId', function(e) {
        Ti.API.error("installationId: ", JSON.stringify(e));
    Parse.subscribeChannel(Alloy.Globals.parse.general);
    Parse.putValue("osVersion", Ti.Platform.osname + " " + Ti.Platform.version);
    Parse.putValue("deviceModel", Ti.Platform.manufacturer + " " + Ti.Platform.model);  
        });

In android 6 the channels, osVersion and deviceModel don't appear in dashboard and I get this error Log in logcat
E/ParseModule(979): (main) [633,633] Installation initialization failed: java.lang.IllegalArgumentException: method PUT must have a request body.

App crashing on Unsubscribe

[ERROR] : ParseCommandCache: Failed to run command.
[ERROR] : ParseCommandCache: com.parse.ParseException: object not found for update
[ERROR] : ParseCommandCache: at com.parse.ParseCommand.onPostExecute(ParseCommand.java:401)
[ERROR] : ParseCommandCache: at com.parse.ParseRequest$5.then(ParseRequest.java:342)
[ERROR] : ParseCommandCache: at com.parse.ParseRequest$5.then(ParseRequest.java:339)
[ERROR] : ParseCommandCache: at bolts.Task$10.run(Task.java:477)
[ERROR] : ParseCommandCache: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
[ERROR] : ParseCommandCache: at bolts.Task.completeAfterTask(Task.java:473)
[ERROR] : ParseCommandCache: at bolts.Task.continueWithTask(Task.java:349)
[ERROR] : ParseCommandCache: at bolts.Task.continueWithTask(Task.java:360)
[ERROR] : ParseCommandCache: at bolts.Task$8.then(Task.java:406)
[ERROR] : ParseCommandCache: at bolts.Task$8.then(Task.java:398)
[ERROR] : ParseCommandCache: at bolts.Task$10.run(Task.java:477)
[ERROR] : ParseCommandCache: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
[ERROR] : ParseCommandCache: at bolts.Task.completeAfterTask(Task.java:473)
[ERROR] : ParseCommandCache: at bolts.Task.access$200(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$6.then(Task.java:342)
[ERROR] : ParseCommandCache: at bolts.Task$6.then(Task.java:339)
[ERROR] : ParseCommandCache: at bolts.Task.runContinuations(Task.java:506)
[ERROR] : ParseCommandCache: at bolts.Task.access$600(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.trySetResult(Task.java:561)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.setResult(Task.java:595)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:489)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:481)
[ERROR] : ParseCommandCache: at bolts.Task$9.run(Task.java:444)
[ERROR] : ParseCommandCache: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
[ERROR] : ParseCommandCache: at bolts.Task.completeImmediately(Task.java:440)
[ERROR] : ParseCommandCache: at bolts.Task.access$100(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$5.then(Task.java:307)
[ERROR] : ParseCommandCache: at bolts.Task$5.then(Task.java:304)
[ERROR] : ParseCommandCache: at bolts.Task.runContinuations(Task.java:506)
[ERROR] : ParseCommandCache: at bolts.Task.access$600(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.trySetResult(Task.java:561)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.setResult(Task.java:595)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:489)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:481)
[ERROR] : ParseCommandCache: at bolts.Task$9.run(Task.java:444)
[ERROR] : ParseCommandCache: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
[ERROR] : ParseCommandCache: at bolts.Task.completeImmediately(Task.java:440)
[ERROR] : ParseCommandCache: at bolts.Task.access$100(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$5.then(Task.java:307)
[ERROR] : ParseCommandCache: at bolts.Task$5.then(Task.java:304)
[ERROR] : ParseCommandCache: at bolts.Task.runContinuations(Task.java:506)
[ERROR] : ParseCommandCache: at bolts.Task.access$600(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.trySetResult(Task.java:561)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.setResult(Task.java:595)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:489)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:481)
[ERROR] : ParseCommandCache: at bolts.Task$9.run(Task.java:444)
[ERROR] : ParseCommandCache: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
[ERROR] : ParseCommandCache: at bolts.Task.completeImmediately(Task.java:440)
[ERROR] : ParseCommandCache: at bolts.Task.continueWith(Task.java:314)
[ERROR] : ParseCommandCache: at bolts.Task.continueWith(Task.java:325)
[ERROR] : ParseCommandCache:
[ERROR] : ParseCommandCache: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
[ERROR] : ParseCommandCache: at bolts.Task.completeAfterTask(Task.java:473)
[ERROR] : ParseCommandCache: at bolts.Task.access$200(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$6.then(Task.java:342)
[ERROR] : ParseCommandCache: at bolts.Task$6.then(Task.java:339)
[ERROR] : ParseCommandCache: at bolts.Task.runContinuations(Task.java:506)
[ERROR] : ParseCommandCache: at bolts.Task.access$600(Task.java:27)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.trySetResult(Task.java:561)
[ERROR] : ParseCommandCache: at bolts.Task$TaskCompletionSource.setResult(Task.java:595)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:489)
[ERROR] : ParseCommandCache: at bolts.Task$10$1.then(Task.java:481)
[ERROR] : ParseCommandCache: at bolts.Task$9.run(Task.java:444)
[ERROR] : ParseCommandCache: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
[ERROR] : ParseCommandCache: at bolts.Task.completeImmediately(Task.java:440)
[ERROR] : ParseCommandCache: at bolts.Task.continueWith(Task.java:314)
[ERROR] : ParseCommandCache: at bolts.Task.continueWith(Task.java:325)
[ERROR] : ParseCommandCache: at bolts.Task$10.run(Task.java:481)
[ERROR] : ParseCommandCache: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
[ERROR] : ParseCommandCache: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
[ERROR] : ParseCommandCache: at java.lang.Thread.run(Thread.java:818)

Error on installation

Hi @timanrebel,

When I try and install this module I keep getting this as an error. I have followed the instructions provided in the readme. Can you assist please?

[ERROR] : TiApplication: (main) [28,421] No valid root or current activity found for application instance

Fail building iOS module

I know this is a work in progress, I'm trying to add it to my project and it seems that FacebookSDK is already linked (probably with Titanium).

I'm really new to native module development, what am I missing ?

[TRACE] duplicate symbol _OBJC_METACLASS_$_FBViewController in:
[TRACE]     /Users/thibz/Documents/github/titanium/app1/modules/iphone/rebel.parse/0.1.0/assets/Frameworks/FacebookSDK.framework/FacebookSDK(FBViewController.o)
[TRACE]     /Users/thibz/Library/Application Support/Titanium/modules/iphone/facebook/3.2.0/libfacebook.a(FBViewController.o)
[TRACE] ld: 304 duplicate symbols for architecture i386

Removing FacebookSDKfrom the linked libs in module.xcconfig is also failing

[TRACE] Undefined symbols for architecture i386:
[TRACE]   "_OBJC_CLASS_$_FBAppCall", referenced from:
[TRACE]       objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
[TRACE]       objc-class-ref in librebel.parse.a(RebelParseModule.o)
[TRACE]   "_OBJC_CLASS_$_BFExecutor", referenced from:
[TRACE]       objc-class-ref in Parse(BFTask+Private.o)
[TRACE]       l_OBJC_$_CATEGORY_BFExecutor_$_Background in Parse(BFTask+Private.o)
[TRACE]   "_OBJC_CLASS_$_FBAppEvents", referenced from:
[TRACE]       objc-class-ref in librebel.parse.a(RebelParseModule.o)
[TRACE]   "_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
[TRACE]       objc-class-ref in Parse(PFObject.o)
[TRACE]       objc-class-ref in Parse(PFCommandCache.o)
[TRACE]       objc-class-ref in Parse(PF_Twitter.o)
[TRACE]       objc-class-ref in Parse(PFNetworkCommandRunner.o)
[TRACE]       objc-class-ref in Parse(PFFile.o)
[TRACE]       objc-class-ref in Parse(BFTask+Private.o)
[TRACE]   "_OBJC_CLASS_$_BFTask", referenced from:
[TRACE]       objc-class-ref in Parse(PFPush.o)
[TRACE]       objc-class-ref in Parse(PFObject.o)
[TRACE]       objc-class-ref in Parse(PFUser.o)
[TRACE]       objc-class-ref in Parse(PFBlockRetryer.o)
[TRACE]       objc-class-ref in Parse(PFQuery.o)
[TRACE]       objc-class-ref in Parse(PFCachedCommandRunner.o)
[TRACE]       objc-class-ref in Parse(PFRetryingCommandRunner.o)
[TRACE]       ...
[TRACE] ld: symbol(s) not found for architecture i386

Anroid receives two push notifications instead of one

I am testing the app on Samsung galaxy s3, and samsung tablet, when I send a notification from the dashboard, the app receives two notifications instead of one, how can I solve that ?

I deleted the app, unsbscribed from channels and then subscribed in just one channel but same result.

Any way to have "testing" keys for Android?

I have a production app and a testing app. The way you have it working for android with the keys being in the tiapp.xml doesn't allow for swapping out the keys for dev keys. Is there any other way to accomplish this? Thanks

Not receiving push when app is stopped?

I am not sure if it's correct behaviour or not, but I only managed to receive push notifications when app is running or in background.
When App is completely stopped, they don't come.

Android push icon

Just thought I'd leave a note for anyone trying to change the notification icon on android.

By default the app icon is used, however on lollipop and above this icon is converted to a white mask. Often this isn't suitable.

Parse allow you to customise this icon by adding a meta tag to the android manifest inside of your tiapp.xml file. More details can be found here: https://parse.com/tutorials/android-push-notifications

The basic format is
<meta-data android:name="com.parse.push.notification_icon" android:resource="@drawable/push_icon"/>

Might be nice to add this to your documentation at some stage as it took me a bit of searching to work it out.

App is not alive / App was killed.

I use this module receives a push service.
This module being used in two of the app. One of the key server and the server being implemented for the push service.
But it generates the following error in one app.

[DEBUG] onPushReceive: App is not alive; 'notificationreceive' won't be triggered
[DEBUG] onPushOpen: App was killed; resume the app without triggering 'notificationopen'

This log can understand that occurs when the module is causing the destroy.
I have merely had quit the app is running. Under what circumstances would like to know whether this module destroy. Currently occurring in Android devices.

Can't determine auth issue - was working

I'm getting these errors, I've Ti.API.info'd and checked that the keys are correct.

[INFO] : Registering push...
[INFO] : Registering AnroidPush with keys: xxx//xxx
[INFO] : Editor: setup window support handles
[INFO] : Editor: setup window support handles
[INFO] : APSAnalyticsService: Analytics Service Started
[INFO] : I/System.out: Thread-63873 calls detatch()
[INFO] : APSAnalyticsService: Stopping Analytics Service
[WARN] : DefaultRequestDirector: Authentication error: Unable to respond to any of these challenges: {}
[INFO] : I/System.out: ParseRequest.NETWORK_EXECUTOR-thread-11 calls detatch()
[WARN] : DefaultRequestDirector: Authentication error: Unable to respond to any of these challenges: {}
[INFO] : I/System.out: ParseRequest.NETWORK_EXECUTOR-thread-12 calls detatch()
[WARN] : DefaultRequestDirector: Authentication error: Unable to respond to any of these challenges: {}
[INFO] : I/System.out: ParseRequest.NETWORK_EXECUTOR-thread-13 calls detatch()
[WARN] : DefaultRequestDirector: Authentication error: Unable to respond to any of these challenges: {}
[INFO] : I/System.out: ParseRequest.NETWORK_EXECUTOR-thread-14 calls detatch()

            var TiManParse = require('eu.rebelcorp.parse'); 
            TiManParse.start();

            Ti.API.info("Registering AnroidPush with keys: " +  Ti.App.Properties.getString('parse_appID') + "//" + Ti.App.Properties.getString('parse_clientID'));
            // Subscribe of unsubscribe to Parse Channels
            TiManParse.subscribeChannel('default');

            TiManParse.addEventListener('notificationreceive', function(e) {
                Ti.API.log("notification: ", JSON.stringify(e));
            }); 
            //background
            var data = Ti.App.Android.launchIntent.getStringExtra('com.parse.Data');
            if(data) {
                try {
                    var json = JSON.parse(data);
                    Ti.API.info("Background JSON"+data);
                    // Now handle the click on the notification
                }catch(e) {}
            }

how to unsubscribe from the push service

hi, great work really :)

but is there any method to unsubscribe from the service, because i work on app using remote APIs for parse, and has a user logout method

thanks

onPushReceive: App is not alive; 'notificationreceive' won't be triggered

I am using http://gitt.io/component/eu.rebelcorp.parse (0.14.1) module in my Titanium Android app. It works well but when a notification received on the device it shows below error and the notification does not interact with the app.

onPushReceive: App is not alive; 'notificationreceive' won't be triggered

when I click on the notification it shows below error:

onPushOpen: App was killed; resume the app without triggering 'notificationopen'

Please help.

Please update gittion

I notice that you have update your module, which is great by the way, but when I install it through gittion install, I get the 0.9 version

Cheers

App crashes on android when a click on the notification happens

The app crashes on android when data has value,

var data = Ti.App.Android.launchIntent.getStringExtra('com.parse.Data');

When the app is closed and I click on the received notification, the app opens and but crashes in the previous line of code, am I doing something wrong ?

Fail building Android app

Hi I'm using facebook module 5.0.0 and the latest version of this module, along with appc 5.3.0.GA.
When I try to build my app, I'm getting this

[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/AggregateException;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/AndroidExecutors;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/AndroidExecutors$1;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/AndroidExecutors$UIThreadExecutor;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/BoltsExecutors;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/BoltsExecutors$1;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/BoltsExecutors$ImmediateExecutor;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/CancellationToken;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lbolts/CancellationTokenRegistration;
[ERROR]
[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] java.lang.RuntimeException: Translation has been interrupted
[ERROR] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
[ERROR] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
[ERROR] at com.android.dx.command.dexer.Main.run(Main.java:277)
[ERROR] at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] at com.android.dx.command.Main.main(Main.java:106)
[ERROR] Caused by: java.lang.InterruptedException: Too many errors
[ERROR] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
[ERROR] ... 4 more

It says in the doc that the module is compatible with facebook 5.0.0 but it's not working neither.

TiDownloadManager throws javax.net.ssl.SSLHandshakeException when module is used

With the following code:

var win = Ti.UI.createWindow({backgroundColor: 'white'});
var img = Ti.UI.createImageView({image: 'https://www.house-battle.com/icon/342_300_1444294452_254697914.png'});

win.add(img);

win.addEventListener('click', function() {
    var xhr = Ti.Network.createHTTPClient();
    xhr.open('GET', 'https://www.house-battle.com/icon/342_300_1444294452_254697914.png');
    xhr.send();
});

win.open();

The HTTPClient always works, but the image does not when the eu.rebelcorp.parse module is included (not even used) in the project:

[ERROR] TiDownloadManager: (pool-7-thread-1) [356,356] Exception downloading https://www.house-battle.com/icon/342_300_1444294452_254697914.png
[ERROR] TiDownloadManager: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
[ERROR] TiDownloadManager:  at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:322)
[ERROR] TiDownloadManager:  at android.net.SSLCertificateSocketFactory.verifyHostname(SSLCertificateSocketFactory.java:196)
[ERROR] TiDownloadManager:  at android.net.SSLCertificateSocketFactory.createSocket(SSLCertificateSocketFactory.java:441)
[ERROR] TiDownloadManager:  at com.android.okhttp.Connection.upgradeToTls(Connection.java:175)
[ERROR] TiDownloadManager:  at com.android.okhttp.Connection.connect(Connection.java:155)
[ERROR] TiDownloadManager:  at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
[ERROR] TiDownloadManager:  at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
[ERROR] TiDownloadManager:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:382)
[ERROR] TiDownloadManager:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:332)
[ERROR] TiDownloadManager:  at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:199)
[ERROR] TiDownloadManager:  at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
[ERROR] TiDownloadManager:  at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
[ERROR] TiDownloadManager:  at java.net.URL.openStream(URL.java:470)
[ERROR] TiDownloadManager:  at org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:135)
[ERROR] TiDownloadManager:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
[ERROR] TiDownloadManager:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
[ERROR] TiDownloadManager:  at java.lang.Thread.run(Thread.java:818)
[ERROR] TiDownloadManager: Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
[ERROR] TiDownloadManager:  at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:318)
[ERROR] TiDownloadManager:  at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:219)
[ERROR] TiDownloadManager:  at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:114)
[ERROR] TiDownloadManager:  at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:550)
[ERROR] TiDownloadManager:  at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
[ERROR] TiDownloadManager:  at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:318)
[ERROR] TiDownloadManager:  ... 16 more
[ERROR] TiDownloadManager: Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
[ERROR] TiDownloadManager:  ... 22 more

Not receiving notification events

I am working with the latest version of this module and have added event listeners like this:

                    var Parse = require('eu.rebelcorp.parse');
                    Parse.start();
                    Parse.subscribeChannel('PushChannel');
                    Parse.addEventListener('notificationreceive', function(e) {
                        Ti.API.log("Parse notification receive: ", JSON.stringify(e));
                    });
                    Parse.addEventListener('notificationopen', function(e) {
                        Ti.API.log("Parse notification open: ", JSON.stringify(e));

                        // check for data
                        var data = Ti.App.Android.launchIntent.getStringExtra('com.parse.Data');
                        if(data) {
                            try {
                                var json = JSON.parse(data);

                                // Now handle the click on the notification
                            } catch(e) {
                                Ti.API.log("Parse notification open error on parse data: ", JSON.stringify(e));
                            }
                        }
                    });

When a notification is received, the app open as expected but I am not seeing any of the notification events. Here is what LogCat looks like:

03-26 10:42:02.075: D/onReceive(12849): got action com.parse.push.intent.OPEN
03-26 10:42:02.076: D/onReceive(12849): no instance of ParseModule found

03-26 10:30:05.480: W/GCM-DMM(929): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.penton.android.aw (has extras) }
03-26 10:30:05.510: W/GCM-DMM(929): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.penton.android.aw (has extras) }
03-26 10:30:05.580: D/onReceive(12849): got action com.parse.push.intent.RECEIVE
03-26 10:30:05.580: D/onReceive(12849): no instance of ParseModule found
03-26 10:30:05.628: D/onReceive(12849): got action com.parse.push.intent.RECEIVE
03-26 10:30:05.628: D/onReceive(12849): no instance of ParseModule found

Obviously there seems to be an issue with "ParseModule", the Public Class for this module - am I missing something in my configuration of the module? I am only including the keys in the tiapp.xml as you specify. Let me know what I am doing wrong.

Thanks,

Brian Caufield

deviceToken

Is it possible to add a possibility to get the DeviceToken, similar like it´s done in CloudPush?

And possibly an event or callback that´s fired when "start" returns

Android : ParseException when enablePush

Hi Timan,

  • Titanium 3.3.0
  • Android 4.x (tested 4.0.2 tablet and 4.4 phone)
  • I've got Parse_AppId and Parse_ClientKey properties in my TiApp.xml

Failed to run command.
com.parse.ParseException: at least one ID field (installationId,deviceToken) must be specified in this operation
at com.parse.ParseCommand.onPostExecute(ParseCommand.java:334)
at com.parse.ParseRequest$5.then(ParseRequest.java:314)
at com.parse.ParseRequest$5.then(ParseRequest.java:311)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.continueWithTask(Task.java:364)
at com.parse.Task$9.then(Task.java:410)
at com.parse.Task$9.then(Task.java:402)
at com.parse.Task$11.run(Task.java:481)
...
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)

Happens sometimes, and sometimes it works.
Seems to occur the first time I launch the app after installing.

Thanks !

No notification received if force close app

This module has worked perfectly for both when I open the app, and then close it and let it run in the background.

However, if I force close the app, then send a notification via Parse, I don't even receive the notification in the status bar. Any thoughts?

livequery

Hi, is livequery implemented?
if yes, how to use it ?
thanks

deviceToken

Is it possible to add a possibility to get the DeviceToken, similar like it´s done in CloudPush?

And possibly an event or callback that´s fired when "start" returns

at least one ID field (installationId,deviceToken) must be specified in this operation

@timanrebel thank you very much for your effort on making this new version! :-)

I am implementing it on my project, but unfortunately I am facing another issue. Am I doing anything wrong?

The error is this one bellow:

[ERROR] : ParseCommandCache: Failed to run command.
[ERROR] : ParseCommandCache: com.parse.ParseException: at least one ID field (installationId,deviceToken) must be specified in this operation
[ERROR] : ParseCommandCache: at com.parse.ParseCommand.onPostExecute(ParseCommand.java:334)
[ERROR] : ParseCommandCache: at com.parse.ParseRequest$5.then(ParseRequest.java:314)
[ERROR] : ParseCommandCache: at com.parse.ParseRequest$5.then(ParseRequest.java:311)
[ERROR] : ParseCommandCache: at com.parse.Task$11.run(Task.java:481)
[ERROR] : ParseCommandCache: at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
[ERROR] : ParseCommandCache: at com.parse.Task.completeAfterTask(Task.java:477)
[ERROR] : ParseCommandCache: at com.parse.Task.continueWithTask(Task.java:353)
[ERROR] : ParseCommandCache: at com.parse.Task.continueWithTask(Task.java:364)
[ERROR] : ParseCommandCache: at com.parse.Task$9.then(Task.java:410)
[ERROR] : ParseCommandCache: at com.parse.Task$9.then(Task.java:402)
[ERROR] : ParseCommandCache: at com.parse.Task$11.run(Task.java:481)
[ERROR] : ParseCommandCache: at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
[ERROR] : ParseCommandCache: at com.parse.Task.completeAfterTask(Task.java:477)
[ERROR] : ParseCommandCache: at com.parse.Task.access$400(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$7.then(Task.java:346)
[ERROR] : ParseCommandCache: at com.parse.Task$7.then(Task.java:343)
[ERROR] : ParseCommandCache: at com.parse.Task.runContinuations(Task.java:510)
[ERROR] : ParseCommandCache: at com.parse.Task.access$800(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:493)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:485)
[ERROR] : ParseCommandCache: at com.parse.Task$10.run(Task.java:448)
[ERROR] : ParseCommandCache: at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
[ERROR] : ParseCommandCache: at com.parse.Task.completeImmediately(Task.java:444)
[ERROR] : ParseCommandCache: at com.parse.Task.access$300(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$6.then(Task.java:311)
[ERROR] : ParseCommandCache: at com.parse.Task$6.then(Task.java:308)
[ERROR] : ParseCommandCache: at com.parse.Task.runContinuations(Task.java:510)
[ERROR] : ParseCommandCache: at com.parse.Task.access$800(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:493)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:485)
[ERROR] : ParseCommandCache: at com.parse.Task$10.run(Task.java:448)
[ERROR] : ParseCommandCache: at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
[ERROR] : ParseCommandCache: at com.parse.Task.completeImmediately(Task.java:444)
[ERROR] : ParseCommandCache: at com.parse.Task.access$300(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$6.then(Task.java:311)
[ERROR] : ParseCommandCache: at com.parse.Task$6.then(Task.java:308)
[ERROR] : ParseCommandCache: at com.parse.Task.runContinuations(Task.java:510)
[ERROR] : ParseCommandCache: at com.parse.Task.access$800(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:493)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:485)
[ERROR] : ParseCommandCache: at com.parse.Task$10.run(Task.java:448)
[ERROR] : ParseCommandCache: at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
[ERROR] : ParseCommandCache: at com.parse.Task.completeImmediately(Task.java:444)
[ERROR] : ParseCommandCache: at com.parse.Task.continueWith(Task.java:329)
[ERROR] : ParseCommandCache: at com.parse.Task$11.run(Task.java:485)
[ERROR] : ParseCommandCache: at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
[ERROR] : ParseCommandCache: at com.parse.Task.completeAfterTask(Task.java:477)
[ERROR] : ParseCommandCache: at com.parse.Task.access$400(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$7.then(Task.java:346)
[ERROR] : ParseCommandCache: at com.parse.Task$7.then(Task.java:343)
[ERROR] : ParseCommandCache: at com.parse.Task.runContinuations(Task.java:510)
[ERROR] : ParseCommandCache: at com.parse.Task.access$800(Task.java:22)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
[ERROR] : ParseCommandCache: at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:493)
[ERROR] : ParseCommandCache: at com.parse.Task$11$1.then(Task.java:485)
[ERROR] : ParseCommandCache: at com.parse.Task$10.run(Task.java:448)
[ERROR] : ParseCommandCache: at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
[ERROR] : ParseCommandCache: at com.parse.Task.completeImmediately(Task.java:444)
[ERROR] : ParseCommandCache: at com.parse.Task.continueWith(Task.java:318)
[ERROR] : ParseCommandCache: at com.parse.Task.continueWith(Task.java:329)
[ERROR] : ParseCommandCache: at com.parse.Task$11.run(Task.java:485)
[ERROR] : ParseCommandCache: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
[ERROR] : ParseCommandCache: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
[ERROR] : ParseCommandCache: at java.lang.Thread.run(Thread.java:841)

Subscription Event Listener

Hi Tim,

Is possible to implement a eventlistener for the subscription process, please?

Parse.subscribeChannel('user_123');
Parse.addEventListener('channelSubscription', function(event){
if(event.error){
//Do something
}else{
//Yeah!
}
})

Thanks again for this awesome module!

Unable to start receiver com.parse.ParseBroadcastReceiver

Rebelcorp,

Thank you very much for this module. It has been helping me a lot.
Unfortunately, I am experiencing a problem regarding the broadcast receiver, as the log below can show. Could you help me, please?

java.lang.RuntimeException: Unable to start receiver com.parse.ParseBroadcastReceiver: java.lang.RuntimeException: applicationContext is null. You must call Parse.initialize(context, applicationId, clientKey) before using the Parse library.
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2657)
at android.app.ActivityThread.access$1800(ActivityThread.java:173)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1379)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5579)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: applicationContext is null. You must call Parse.initialize(context, applicationId, clientKey) before using the Parse library.
at com.parse.Parse.checkContext(Parse.java:557)
at com.parse.Parse.getApplicationContext(Parse.java:165)
at com.parse.ManifestInfo.getContext(ManifestInfo.java:221)
at com.parse.ManifestInfo.getPackageManager(ManifestInfo.java:229)
at com.parse.ManifestInfo.getPackageInfo(ManifestInfo.java:240)
at com.parse.ManifestInfo.deviceSupportsGcm(ManifestInfo.java:325)
at com.parse.ManifestInfo.getPushType(ManifestInfo.java:109)
at com.parse.PushService.startServiceIfRequired(PushService.java:150)
at com.parse.ParseBroadcastReceiver.onReceive(ParseBroadcastReceiver.java:19)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2642)
... 10 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.