0

In my application I stream video via internet. It works great over WiFi but with 4G network the video is freezing. It's a weird beacuse at first I download video and after that stream from sd card but I'm sure that the problem is in network connection.

Is there any way set internet speed to a certain value programmatically or with third-party applications without root access?

I know about mobiwol, Bandwidth ruler Free and BradyBound but they are not helping.

With android.telephony.TelephonyManager I can get network type and thus determine the speed, but I didn't find how can I set the internet speed by this way.

SOLUTION

I was not found how to 4G network is related with video 'freezing' but I checked how exactly it saved on sd card and the file has been corrupted. I fixed this by adding check incoming file size and saved and if it false then overwritten the file. Thanks @Rolfツ

Anonymous
  • 301
  • 3
  • 8
  • Setting internet speed programmatically, how would that work? In the best case scenario you can limit it to a certain speed, but you won't be able to speed it up or something like that... – Rolf ツ Dec 15 '17 at 13:28
  • @Rolfツ I don't want to increase the speed, but rather set a fixed level of network connection. Can I limit it? – Anonymous Dec 15 '17 at 13:40
  • Well in that case, you can't (unless you want to use root). There are however developer options to do this: https://stackoverflow.com/questions/7026251/android-simulate-low-network-connectivity – Rolf ツ Dec 15 '17 at 13:43
  • @Rolfツ Thanks for link, but it work in emulator I need to set it on real device. If to use root how can I achieve this? Maybe I can set level via reflection in Java? Or this problem not related with network connection at all? – Anonymous Dec 15 '17 at 13:53
  • Even with reflection you can't probably limit it, due to the fact that this feature is not build into the Java interface. I also suspect you will run into permission problems if you try to do this. Root should work but it doesn't seem like network speed is your problem here. I think you need to verify if the downloaded file using WiFI is equal to the downloaded file over 4G. – Rolf ツ Dec 15 '17 at 13:58
  • @Rolfツ You suggest the file which download via 4G can be broken? – Anonymous Dec 15 '17 at 14:11
  • Depends on how your download works, but you should check it. If the files are the same then it should not impact video play-back. – Rolf ツ Dec 15 '17 at 14:25
  • @Rolfツ Thanks a lot, I'll check it – Anonymous Dec 15 '17 at 14:27

0 Answers0