Giter Site home page Giter Site logo

Comments (9)

ijazfahad avatar ijazfahad commented on May 13, 2024

This happened to me too. Try closing the app fully before sending the push. That worked for me and I got the push on time, but I know this isn't the real solution.

from parse-sdk-android.

MaxBleggi avatar MaxBleggi commented on May 13, 2024

I closed, reopened, reinstalled, deleted all users, everything. Nothing seems to work.

I hope someone from the parse team can clear the confusion

from parse-sdk-android.

ijazfahad avatar ijazfahad commented on May 13, 2024

are you using an emulator or a real phone? that could be the problem maybe? i don't know if emulators get push notification or not.

from parse-sdk-android.

stanleyw avatar stanleyw commented on May 13, 2024
  1. Could you try this on the latest SDK and see whether it repros?
  2. If so, this could also be a backend issue. We had some push system delays on Aug 11th (https://status.parse.com/). We continue to use the FB bug tool to track backend issues, where you can confidentially submit information about the exact app that you are having issues on. Could you file an issue there? https://www.parse.com/help

More about SDK bug/repro guidelines at: https://github.com/ParsePlatform/Parse-SDK-Android/blob/master/CONTRIBUTING.md#bugs We plan to use GitHub issues for SDK-specific bugs only.

The Android emulator should be able to receive pushes, but it's sometimes more flaky than a real device. I recommend testing on a real device whenever possible.

from parse-sdk-android.

grantland avatar grantland commented on May 13, 2024

This actually sounds most likely a backend or GCM issue as we don't actually persist anything on the device for push notifications, so you'd either get it right away or not at all. In addition to what Stanley mentioned, you can debug with the following:

  • Enable logging with Parse.setLogLevel(int) and observe whether GCM or PPNS is being used in your error case.
  • Implement your own BroadcastReceiver with an intent filter for com.google.android.c2dm.intent.RECEIVE (and remove that filter for GcmBroadcastReceiver) with some logging in onReceive(). This will get you as raw of a connection to the push pipeline as possible and you can see whether or not the device is actually receiving push notifications.
  • View device logcats. There might be some info from Google Play Services on when it it actually notifying your application of push notifications.

If you can see the application being notified immediately, it might be an issue in the SDK. Otherwise, if the Google Play Services isn't notifying us, it's most likely a delay in our backend or GCM.

from parse-sdk-android.

MaxBleggi avatar MaxBleggi commented on May 13, 2024

Before I continue, I want to add that again at 3 in the morning I received about 30 pushes all at once. All of them were the ones I had tried to send earlier that day

  • yes I am using a real device

@stanleyw

  1. today I switched from the parse*.jar file to the 'com.parse:parse-android:1.10.0' library. I put that dependency in my build.gralde, deleted the old dependencies for parse, deleted the .jar in my libs folder, and for extra measure I cleaned the project. I still had the same issues.
  2. After some further debugging with your guys advise, it looks like it is indeed not an SDK issue after all. I'll file an issue there.

@grantland

  • put Parse.setLogLevel(Parse.LOG_LEVEL_DEBUG) as well as making a simple custom receiver. I'll show the code below. Either I did it wrong or I'm not receiving any pushes. (I'm pretty sure it's the latter) I did not see any indication of receiving a push. So it looks like it's not an SDK issue after all.

Here's my manifest

        <receiver android:name="utils.PushReceiver" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </receiver>

my custom receiver

public class PushReceiver extends BroadcastReceiver
{
    @Override
    public void onReceive(Context context, Intent intent)
    {
        Log.d("custom", "PUSH RECEIVED!!!");
    }
}

(I've never made a receiver before but I'm fairly certain that it should at least hit the log line if it were to receive a push)

Thanks for the help and quick responses. It looks like I'll be filing the issue to a different source

from parse-sdk-android.

grantland avatar grantland commented on May 13, 2024

Yeah unfortunately it looks like a backend or GCM issue, so closing.

from parse-sdk-android.

egenvall avatar egenvall commented on May 13, 2024

Did you find any solution to the problem? I have the same issue with 1.10.
Just to see if I did something wrong I tried the push example
https://github.com/ParsePlatform/PushTutorial
with 1.4.3 that uses the depecated method
PushService.setDefaultPushCallback(this, MainActivity.class);

and it is receiving all my Pushes from the website instantly, without delay. However I have yet to succeed using the newest SDK. Kind of frustrating

from parse-sdk-android.

MaxBleggi avatar MaxBleggi commented on May 13, 2024

I went to facebook to find out if it was a backend issue. here's a link to my debug report: https://developers.facebook.com/bugs/1469047606730343

It was determined that it was something on my device not connecting to GCM or something.

This is a quote from the report after some attempted debuging

"Our engineers had a look at this issue and they had the following comments:

"Pushes Sent" in push console means we successfully handed the push notification to vendors that are beyond in our control (APNS for iOS and GCM for android). We don't know when the message is actually delivered and could do nothing about it.

Regarding the delay seen by the developer, I think the issue is most likely on his device and/or the connection between his device and GCM"

They sent the push successfully onto GCM (for android). After that they have no control over it. And as seen here. It is not an SDK issue. So it is something between GCM and my device.

After tinkering with an emulator to get it to accept pushes, I tried to send some and they all sent just fine. It appeared it was my device that was the problem

from parse-sdk-android.

Related Issues (20)

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.