Giter VIP home page Giter VIP logo

Comments (24)

DFoxinator avatar DFoxinator commented on June 26, 2024 2

I highly recommend using this plugin: https://github.com/hansemannn/titanium-firebase-cloud-messaging

It works perfectly and no crashes.

from ti.goosh.

furthurr avatar furthurr commented on June 26, 2024 1

Good news .... there is a new push whit the fix 👍
Merge branch 'feature/oreo'
I am whating for the dist version

from ti.goosh.

Jei avatar Jei commented on June 26, 2024 1

We've just released a new version of Ti.Goosh that should solve this problem. You can find it here.
Let us know if you're still experiencing the same problem with Ti.Goosh 4.2.0.

from ti.goosh.

yuranevmer avatar yuranevmer commented on June 26, 2024

Same issue with receiving notifications in background on Android 8.

0-02 11:48:44.700  1969  3885 W ActivityManager: Background start not allowed: service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=ua.com.mhp.agro.dev cmp=ua.com.mhp.agro.dev/ti.goosh.IntentService (has extras) } to ua.com.mhp.agro.dev/ti.goosh.IntentService from pid=14856 uid=10165 pkg=ua.com.mhp.agro.dev
10-02 11:48:44.704 14856 14856 D AndroidRuntime: Shutting down VM
10-02 11:48:44.706  3263  3263 W GCM     : broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=ua.com.mhp.agro.dev (has extras) }
10-02 11:48:44.717 14856 14856 E AndroidRuntime: FATAL EXCEPTION: main
10-02 11:48:44.717 14856 14856 E AndroidRuntime: Process: ua.com.mhp.agro.dev, PID: 14856
10-02 11:48:44.717 14856 14856 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver ti.goosh.BroadcastReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=ua.com.mhp.agro.dev cmp=ua.com.mhp.agro.dev/ti.goosh.IntentService (has extras) }: app is in background uid UidRecord{9df5545 u0a165 RCVR bg:+1m2s763ms idle change:uncached procs:1 seq(0,0,0)}
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:3228)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.app.ActivityThread.-wrap17(Unknown Source:0)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:171)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6633)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=ua.com.mhp.agro.dev cmp=ua.com.mhp.agro.dev/ti.goosh.IntentService (has extras) }: app is in background uid UidRecord{9df5545 u0a165 RCVR bg:+1m2s763ms idle change:uncached procs:1 seq(0,0,0)}
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1531)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.app.ContextImpl.startService(ContextImpl.java:1487)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.content.ContextWrapper.startService(ContextWrapper.java:660)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.content.ContextWrapper.startService(ContextWrapper.java:660)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.support.v4.content.WakefulBroadcastReceiver.startWakefulService(WakefulBroadcastReceiver.java:99)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at ti.goosh.BroadcastReceiver.onReceive(BroadcastReceiver.java:32)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:3221)
10-02 11:48:44.717 14856 14856 E AndroidRuntime: 	... 8 more

from ti.goosh.

frodfigu avatar frodfigu commented on June 26, 2024

Same problem here...
Any solution?

from ti.goosh.

DFoxinator avatar DFoxinator commented on June 26, 2024

Has anyone figured out a solution for this?

from ti.goosh.

furthurr avatar furthurr commented on June 26, 2024

Google changed notifications settings ... the notifications in Sdk 26 (android 8) stopped working, the problem is in channel, I think we need to wait for an update of ti.goosh.

captura de pantalla 2018-10-26 a la s 12 02 50

from ti.goosh.

andersdp avatar andersdp commented on June 26, 2024

Still no news on a fix for this?

Play Store now demands that updates has targetSdkVersion=26 so this is important.

from ti.goosh.

andersdp avatar andersdp commented on June 26, 2024

Let's hope that someone who can build a new release sees this (today) 🤞

from ti.goosh.

Jei avatar Jei commented on June 26, 2024

We've merged that fix to try and make the module work with Android Oreo, but there are still things to do. As stated in this comment, there's been radical changes in the way Android handles services. You can find the details here: https://developer.android.com/about/versions/oreo/background.
Basically, methods like "GcmReceiver.startWakefulService()" will throw exception when they are called while the app is closed or flagged as "in background". This means that the current master of Ti.Goosh doesn't show notifications in those cases.
We're trying to migrate the module to the Firebase library to solve these issues.

from ti.goosh.

furthurr avatar furthurr commented on June 26, 2024

I have compiled the module ...
ti.goosh-android-4.1.1.zip
I am testing android 8 and 7 (sdk 25,26) and i have problem with the custom sound on android 8 ... and i have only this issue

from ti.goosh.

andersdp avatar andersdp commented on June 26, 2024

The good news: This fix solves getting push when app is backgrounded.

Bad news: The push does not show up when the app is dead. Furthermore our app stalls and eventually crashes when starting up from dead after having sent a push to the device.

from ti.goosh.

furthurr avatar furthurr commented on June 26, 2024

do you have ?

// subscribe

TiGoosh.subscribe({
	topic: "/topics/myTopic",
	success: function(e) {
		console.log("unsub done " + e);
	},
	error: function(e){
		console.error("error")
	}
})```

from ti.goosh.

eemi2010 avatar eemi2010 commented on June 26, 2024

@furthurr So we need to subscribe to a topic now ? Can be anything ?

from ti.goosh.

furthurr avatar furthurr commented on June 26, 2024

I think so, I had the same problem that @andersdp says, so this way was solved xD.

from ti.goosh.

Jei avatar Jei commented on June 26, 2024

@furthurr It seems unlikely that subscribing to a topic solves the problem of creating a background service from a backgrounded app.
Have you tried sending a notification to the app while it's closed? Is the notification displayed in the tray?

from ti.goosh.

Jei avatar Jei commented on June 26, 2024

I'm working on a fix (using JobScheduler) here: https://github.com/caffeinalab/ti.goosh/tree/hotfix/android-26-jobservice

from ti.goosh.

eemi2010 avatar eemi2010 commented on June 26, 2024

@Jei thx for looking into this :) Is there a build available ?

from ti.goosh.

furthurr avatar furthurr commented on June 26, 2024

this build have te last modification
ti.goosh-android-4.1.1.zip

from ti.goosh.

furthurr avatar furthurr commented on June 26, 2024

this project is compiled with the ti.goosh version that goes up
https://www.youtube.com/watch?v=4b8IyU3YbNU

from ti.goosh.

eemi2010 avatar eemi2010 commented on June 26, 2024

@furthurr will integrate the build and keep you guyz updated. Thx :)

from ti.goosh.

yuranevmer avatar yuranevmer commented on June 26, 2024

Seems that build above doesn't have the latest changes.
Works for me only after I built module manually from ab89be5.
Tested when app is in background mode or closed (Android 8.0).

from ti.goosh.

Abdelalim-dev avatar Abdelalim-dev commented on June 26, 2024

I tried the new version (4.2.0) and it worked just fine on Android 9.
PS: @Jei , why is this issue still opened BTW?

from ti.goosh.

Jei avatar Jei commented on June 26, 2024

I was just waiting for some feedbacks. I think we can consider this issue solved.

from ti.goosh.

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.