Transfer speed Android Wear DataApi? - wear-os

What transfer speed can I expect when transferring data from phone to wearable using the Wearable DataApi?
My idea is to transfer files to the wearable from the phone. It's loads of images so I zip them first and then transfer the zip file as an asset. The file is about 30MB and it takes around 3 minutes to sync them to the wearable. Is that the speed I can expect? It feels really slow.

Bluetooth 3 has same speed as bluetooth 4 so 25mbps.
This means around 3mb per second which should mean the 30mb file should take around 10 seconds.

Related

Extremely slow socket data throughput on Android 11?

I've seen some posts elsewhere about very slow file access after "upgrading" a device to Android 11. I'm not having that, but I AM having unbelievably slow performance in a small app that uses sockets. It's a client app that uses a socket to send a request to a server (mine) that monitors my solar installation, to get data back about how it has been performing etc. So the socket interaction is in a separate thread from the UI, and uses runOnUIThread to call a function that updates the UI with the received data. The request data is only a few bytes, maybe 20 or so maximum: the data coming back varies from a few hundred bytes to maybe 50000 bytes or thereabouts.
If I run this app on my phone (Android 8.1) it is fine - it takes 1.5 to 2 seconds to send the request, get the data back, and update the UI. Perfectly fine. It's the same on an older tablet running Android 7.1.2 too. But I have just recently acquired a flash (read expensive) new Samsung tablet running Android 11, and its performance is woeful - the same app doing the same operation takes anything up to 30 seconds, or even more. And it is exactly the same app, exactly the same code. Both devices are running on the same network, so the only significant difference seems to be the Android version. It is repeatable ad nauseum, so it isn't momentary network load either. The app is built to target API level 26 - it has to be so it can run on all the devices it needs to. It is not a commercial app, just something for my own use, but I am totally bewildered by this behaviour.
The other thing I have noted with this new tablet is that it is unable to provide a video stream from a surveillance IP camera I have at home. I use the TinyCam Pro app from Google Play for this. It can connect, but it has never yet managed to give me a picture, regardless of how good my connection is. Again, my phone and the older tablet can do this more often than not, and the new tablet would have far more horsepower than either of them. There is some sort of serious bottleneck in there!
Has anyone else seen this type of thing on Android 11? If so, is there anything that can be done about it, that is usable on earlier versions too? Or do we just have to wait for Android 11.1?
EDIT: I've done some more investigation on this, and I think I have now pinned it down to a 4G network bandwidth issue. I said that the tablet and the phone were doing exactly the same thing, but I have since remembered that they do NOT use the same carrier for their mobile connections. So it's not EXACTLY the same thing. I would actually expect the network capacity for the tablet's carrier to be superior to that of the phone's carrier, but that appears not to be the case where I am at the moment. So I think I have to take back my evil thoughts about the tablet, and maybe even Android 11. Interesting how easy it is to be misled, and how hard it can be to genuinely compare apples with apples when there are so many variables and so many links in the chain. I'll be doing some more tests and comparisons when back in the city, where network capacity should be much more alike for the two carriers.
yes its true. While compare to Android 11 and Android 8 there is a lot of changes updated because of security issue.
May be, If your managing some file in mobile storage mnt/sdcard/ here in this path its speed of access or managing a file in this path its restricted and its becomes less. So, if your using this path please change it like below because it will cause youe app to process slow.
solution - Try to use this file access path is Android/data/data/packageName/
I mean if your using this logic to access file - Environment.getExternalStorageDirectory()
instead of above try this - Context.getExternalFilesDir(null)
refer this link https://developer.android.com/about/versions/11/privacy/storage
I hopes it will help you...

Stalling WMP with 4 or more streams

I developed an application in C that can display 4 videos, and 1 sound file in the background.
The video uses the WMP object in the C++ class provided by Microsoft in the WMP SDK. The audio uses Windows' MCI (Media Control Interface) which is sent command strings.
To be able to play lots of different formats, I installed windows.7.codec.pack.
I experience a problem that when playing more than 3 media files (video or audio), the media stall. A video to be started constantly cycles from state 3 (Playing) to state 9 (Preparing new media) to state 10 (Ready to begin playing - without anything happening), and so on and so on. This is seen as a flicker of the video (state 3) followed by a few seconds of nothing (black, or desktop background, state 9). Once a video has started, it plays fine until the end.
Decreasing the number of media files to play to 2 videos and 1 audio lets it play fine; increasing to 3 video or more and 1 audio and this happens. Task Manager shows a CPU load of less than 25%, so CPU cannot be the problem.
It seems that MCI and WMP share stuff in the background because not only do videos stall, also audio stops without reporting errors (querying MCI returns that it is playing, but there is no sound).
I upgraded to windows.7.codec.pack.v4.2.6. This had a terrible performance
I reverted to windows.7.codec.pack.v4.1.6. This has a much better performance but still not perfect.
My question(s):
Is there any way I can configure Windows or the codec package to seamlessly handle 5 streams?
How can I report this problem to the developer?
Are there other codec packages that do not have this problem?
Any other suggestion?
System info: Intel i7-3520M X64 dual core at 2.9Ghz with 8GB physical memory and NVIDIA Quatro K1000M display adapter.
I think I found the solution.
After playing a video, I called the Player's Close() method. The documentation says:
The close method releases Windows Media Player resources.
Remarks
This method closes the current digital media file, not the Player itself.
Indeed I wanted to release the media file so it would no longer be busy in the file system. However, it seems that more resources were released than just the media file. As a consequence, for a next media file to be played, the player had to allocate resources again. It seems that turned out to be a bottle neck.
No longer calling Close() but just giving it the URL (filename) of the next media file to play now solved the problem. (I still have to give some retries sometimes but the general performance is now very well acceptable.)
The media file is released when the next media file starts playing.

How Do I Reduce Size of UWP App (Can I Compress HD Images?)

My UWP app for Windows 10, which is in development at the moment and has about 400 - 500 HD images, takes up a whopping 1.7 GB of hard drive space. File Explorer claims that the images take up about 1.68 GB while the code is the other 0.02 GB...
When all is said and done, the app needs to have a couple thousand HD images. Clearly this will be unsustainable as the size of the app will be nearly 10 GB, or possibly even larger.
Is there a way to compress these images within the app?
This is unrelated to this Stack Overflow question. I am not using Xamarin. Also I tested downloading a release build from the Store to confirm--and it does in fact say it is 1.7 GB in size.
The images used in the application are actually application resources.
When the application is packaged, this part of the resource will not be specially processed. You can only compress the image before packaging, or consider extracting the image resource to allow the user to Download and import image resources after installing the application.
Just like some online games, after downloading the game body, they will download additional data packets the first time they run. This part of the resource is not hosted by the store, but is deposited by the developer.

data from msdk to osdk is lost very very often

I'm using osdk3.6 and msdk4.6(android).
I'm sending data from android to osdk,
but data is lost very very often and it is almost unusable.
I edited osdk3.6 mobile sample.
parseFromMobileCallback() is hardly called(but not zero).
Does anyone have any suggestions(changing sdk version or something)?
how much is the size of data you sent?Actually,the upstream (mobile device to onboard computer) bandwidth is approximately 1KB/s while the downstream (onboard computer to mobile device) bandwidth is approximately 8KB/s

Increase speed on RN-41 bluetooth SPP?

I'm using RN-41-APLX bluetooth evaluation board (based on RN-41-APL, very similar to RN-41 but also supports Apple devices) as a member of MFi.
I was able to establish connection and transfer some data to and from dev board with out-of-the-box configuration.
The problem is, in data sheet for RN-41 it is set, that SPP profile supports 240kbps speed, but when I transfer 10kB from iPod touch with Roving test iOS application installed, it takes 5 seconds to transfer.
Since UART speed is 230kbps, I think the bottle neck is the bluetooth link speed, but I can not find any way to change it. Can anybody help with that?
Thanks in advance!
I've run into this problem myself about this chip (well, the RN42 technically) and posted my findings here:
RN42 Bluetooth disconnects on iOS within seconds of streaming data
Short summary:
When the RN42 is used to communicate with an iOS device, it cannot
communicate faster than 2.5-3kB/s... If it's used to communicate with
an Android or computer or anything else, it can transfer at 35kB/s
(over SPP).
Hope it helps!
-SJ

Resources