Comments (18)
i am testing this app with 4 different devices: s2, s5, fairphone 1, nexus 7
but i cannot reproduce your issue.
which device do you use?
could you provide a log?
App for displaying logs: catlog in fdroid and logcat in playstore
from radiodroid.
still the same problem, doing network stuff on main thread:
06-18 19:05:34.304: E/AndroidRuntime(13209): FATAL EXCEPTION: main
06-18 19:05:34.304: E/AndroidRuntime(13209): Process: net.programmierecke.radiodroid2, PID: 13209
06-18 19:05:34.304: E/AndroidRuntime(13209): android.os.NetworkOnMainThreadException
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147)
06-18 19:05:34.304: E/AndroidRuntime(13209): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249)
06-18 19:05:34.304: E/AndroidRuntime(13209): at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
06-18 19:05:34.304: E/AndroidRuntime(13209): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
06-18 19:05:34.304: E/AndroidRuntime(13209): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
06-18 19:05:34.304: E/AndroidRuntime(13209): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.Okio$2.read(Okio.java:113)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.readChunkSize(HttpConnection.java:512)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.read(HttpConnection.java:495)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.Util.skipAll(Util.java:227)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:216)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.close(HttpConnection.java:540)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource.close(RealBufferedSource.java:198)
06-18 19:05:34.304: E/AndroidRuntime(13209): at com.android.okio.RealBufferedSource$1.close(RealBufferedSource.java:181)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.StreamProxy.stop(StreamProxy.java:303)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.PlayerService.Stop(PlayerService.java:473)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.PlayerService$1.Stop(PlayerService.java:75)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.PlayerServiceUtil.stop(PlayerServiceUtil.java:55)
06-18 19:05:34.304: E/AndroidRuntime(13209): at net.programmierecke.radiodroid2.ActivityPlayerInfo$3.onClick(ActivityPlayerInfo.java:106)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.view.View.performClick(View.java:4797)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.view.View$PerformClick.run(View.java:19899)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.Handler.handleCallback(Handler.java:739)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.Handler.dispatchMessage(Handler.java:95)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.os.Looper.loop(Looper.java:135)
06-18 19:05:34.304: E/AndroidRuntime(13209): at android.app.ActivityThread.main(ActivityThread.java:5310)
from radiodroid.
06-18 18:42:17.710: E/AndroidRuntime(12894): FATAL EXCEPTION: main
06-18 18:42:17.710: E/AndroidRuntime(12894): Process: net.programmierecke.radiodroid2, PID: 12894
06-18 18:42:17.710: E/AndroidRuntime(12894): java.lang.RuntimeException: Unable to start service net.programmierecke.radiodroid2.PlayerService@3d894437 with Intent { act=stop flg=0x10000000 cmp=net.programmierecke.radiodroid2/.PlayerService bnds=[193,413][1056,557] }: android.os.NetworkOnMainThreadException
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2956)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.access$2200(ActivityThread.java:154)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1419)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.os.Handler.dispatchMessage(Handler.java:102)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.os.Looper.loop(Looper.java:135)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.main(ActivityThread.java:5310)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.lang.reflect.Method.invoke(Native Method)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.lang.reflect.Method.invoke(Method.java:372)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
06-18 18:42:17.710: E/AndroidRuntime(12894): Caused by: android.os.NetworkOnMainThreadException
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147)
06-18 18:42:17.710: E/AndroidRuntime(12894): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249)
06-18 18:42:17.710: E/AndroidRuntime(12894): at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
06-18 18:42:17.710: E/AndroidRuntime(12894): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.Okio$2.read(Okio.java:113)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.readChunkSize(HttpConnection.java:512)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.read(HttpConnection.java:495)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.Util.skipAll(Util.java:227)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:216)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okhttp.internal.http.HttpConnection$ChunkedSource.close(HttpConnection.java:540)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource.close(RealBufferedSource.java:198)
06-18 18:42:17.710: E/AndroidRuntime(12894): at com.android.okio.RealBufferedSource$1.close(RealBufferedSource.java:181)
06-18 18:42:17.710: E/AndroidRuntime(12894): at net.programmierecke.radiodroid2.StreamProxy.stop(StreamProxy.java:303)
06-18 18:42:17.710: E/AndroidRuntime(12894): at net.programmierecke.radiodroid2.PlayerService.Stop(PlayerService.java:473)
06-18 18:42:17.710: E/AndroidRuntime(12894): at net.programmierecke.radiodroid2.PlayerService.onStartCommand(PlayerService.java:264)
06-18 18:42:17.710: E/AndroidRuntime(12894): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2939)
06-18 18:42:17.710: E/AndroidRuntime(12894): ... 10 more
from radiodroid.
put this in your onCreate() method to find all these problems:
------- only after API level 9 ------- ------- only after API level 9 ------- try { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyDeath().penaltyLog().build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build()); StrictMode.ThreadPolicy old = StrictMode.getThreadPolicy(); StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder(old).permitDiskWrites().build()); old = StrictMode.getThreadPolicy(); StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder(old).permitDiskReads().build()); } catch (NoClassDefFoundError e) { } ------- only after API level 9 ------- ------- only after API level 9 -------
from radiodroid.
still happens on 0.20 version
from radiodroid.
any new on this? this is very bad :-(
from radiodroid.
thank you for your help!
i still cannot reproduce this, but your Log helped a lot.
please try again in version 0.21
from radiodroid.
no problem. if it happens again i will send log again.
when will 0.21 be available on f-droid?
from radiodroid.
fdroid takes 24 hours. :(
from radiodroid.
from radiodroid.
that is the current build, if you check it now, i will wait with pushing to fdroid
from radiodroid.
i pushed the new build, because i got no answer
from radiodroid.
i can not test now. at home it works. but normally i use it in my car with blutooth.
when i use it in the car next time i will tell you ASAP.
thanks for your work!
from radiodroid.
0.21 works fine now. thanks!
from radiodroid.
cool!
from radiodroid.
aso, du bist eh aus wien :-)
from radiodroid.
yes :) du auch?
from radiodroid.
yup. stupid that on github you can not send private messages.
from radiodroid.
Related Issues (20)
- Stationsicons werden nicht angezeigt HOT 1
- in-stream Metadata not shown HOT 2
- Metered connection detected/not playing HOT 1
- Chromecast UI redesign
- Hardrockin80s
- Support for recording the *current* track HOT 2
- request, reduce volume when sleep mode. ex 10db
- Request: integrate with Waze
- Click on the radio category information in the favorites, the app crashes
- Request: Schedule changing radio stations
- Sleep timer does not work
- Request // Add Station Icons manually
- Request // Enlarge the Status Bar
- feedback creating a new alarm when no station is selected yet
- Can't connect to any stations HOT 1
- Android 14 no Rights to storage needed HOT 1
- Impossible to connect to radio stations HOT 1
- Some stations marked as deleted from RadioBrowser
- Station hr3 aac HOT 1
- Pls don't use blue for text
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 radiodroid.