Comments (14)
What version of Android does the Mot Milestone run?
from car-cast.
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.
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.
Looking through the code there is an attempt to start as a foreground service, how can I help debug this?
from car-cast.
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.
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.
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.
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.
Oops.. I should at least try this first
from car-cast.
OK, now the version at http://jadn.com/cc.apk runs... can you try it out?
from car-cast.
Still no notification icon upon playing, does it work for you? Do you see a notification icon?
from car-cast.
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.
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.
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)
- Volume Keys on Face HOT 1
- When changing data directory, copy data files
- "Top" button should be "Play Next". HOT 1
- Audio Recorder improvments/fixes
- Add "Import OPML" or "Import Subscriptions" HOT 1
- Record GPS position and times.
- Confirm Delete of Subscription
- Play Order should default to Oldest First HOT 1
- allow downloading a specific podcast from a subscription
- Scheduled download not (re)starting after reboot
- some NPR casts not downloading HOT 4
- Podcast list is compressed on Android 5.0
- change quick jump size
- podcast screen, more space between checkbox
- download screen, allow orientation change.
- NPE on send intent
- total times on podcast screen
- Play button not working HOT 1
- Update website link HOT 6
- Made for older version of Android HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from car-cast.