Giter Club home page Giter Club logo

Comments (14)

bherrmann7 avatar bherrmann7 commented on July 29, 2024

What version of Android does the Mot Milestone run?

from car-cast.

andrm avatar andrm commented on July 29, 2024

It's Android 2.2. MOT admitted this version not stellar, so it is quite sluggish in close to everything. It's not CC's "fault" per se, I was just interested what reason there is for not using foreground. Thanks!

from car-cast.

baruch avatar baruch commented on July 29, 2024

This is a real issue for me, I use CarCast on the train so I like to read stuff and listen to the music podcast in the background, from time to time CC will just disappear and won't even save a bookmark for the last second so I'll have to go and search for the location. The worst part is that the music stopped in the first place.

from car-cast.

baruch avatar baruch commented on July 29, 2024

Looking through the code there is an attempt to start as a foreground service, how can I help debug this?

from car-cast.

bherrmann7 avatar bherrmann7 commented on July 29, 2024

Are we using it correctly? The google code in the first link did a fair amount of indirection to support many versions of android

from car-cast.

baruch avatar baruch commented on July 29, 2024

I haven't done any android development so far so I dont know. I do know that CC doesn't show any notification icon on my system even when it is playing so something is probably not happening properly.

from car-cast.

baruch avatar baruch commented on July 29, 2024

A quick code review that you do call stopForegroundCompat() but you never call startForegroundCompat. There are still calls sprinkled around for setForeground(true/false) that is deprecated in later APIs (2.0 and up actually).

from car-cast.

bherrmann7 avatar bherrmann7 commented on July 29, 2024

OK, I desprinkled the setforeground stuff. I committed these changes to Git. Can you test them http://jadn.com/cc.apk. thx

from car-cast.

bherrmann7 avatar bherrmann7 commented on July 29, 2024

Oops.. I should at least try this first

from car-cast.

bherrmann7 avatar bherrmann7 commented on July 29, 2024

OK, now the version at http://jadn.com/cc.apk runs... can you try it out?

from car-cast.

baruch avatar baruch commented on July 29, 2024

Still no notification icon upon playing, does it work for you? Do you see a notification icon?

from car-cast.

baruch avatar baruch commented on July 29, 2024

I believe that calling the foreground task without a notification (a null notification) defeats the purpose, the idea from what I read so far is that there must be a notification icon for the user to know that something runs in the background.

from car-cast.

baruch avatar baruch commented on July 29, 2024

I can't seem to install my own build of CC, this is the patch that is worth trying IMHO

$ git diff
diff --git a/cc/src/com/jadn/cc/services/ContentService.java b/cc/src/com/jadn/cc/services/ContentService.java
index adce0f1..c6daf0f 100644
--- a/cc/src/com/jadn/cc/services/ContentService.java
+++ b/cc/src/com/jadn/cc/services/ContentService.java
@@ -490,7 +490,9 @@ public class ContentService extends Service implements OnCompletionListener {
                headsetReceiver = new HeadsetReceiver(this);
                registerReceiver(headsetReceiver, new IntentFilter(Intent.ACTION_HEADSET_PLUG));

-               startForegroundCompat(0,null);
+               Notification notification = new Notification();
+               notification.icon = R.drawable.ccp_launcher;
+               startForegroundCompat(0, notification);
        }

        public void headsetStatusChanged(boolean headsetPresent) {

I managed to install and it crashees, I have no USB cable to debug so it will have to wait for next week.

from car-cast.

andrm avatar andrm commented on July 29, 2024

The lastest update shows the icon for foreground mode. This should fix the issue, I'm closing it. Thanks!

from car-cast.

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.