I am testing a simple webrtc application and for that I do a video call using a browser. I have setup an emulator running Android R (10.0+) emulating Pixel 3 with 4 GB of ram and 6 GB of hard drive space. I made a call using the application between the emulator and the desktop, using chrome on both devices, and I got a black screen for participant's video on both screens. I used the parameter document.getElementsByTagName('video').readyState and document.getElementsByTagName('video').networkState and I got a value of 0 or no data for readystate and, a value of 2 or loading for the networkState. I tried the same setup with a different emulator (Pixel with Android Q) and checked the same parameter, and I had no issues. I was able to see the video from both participants. Can anyone help me out?
Edit: Actually I just figured this out. If you go in and remove "OMX.google" from https://chromium.googlesource.com/external/webrtc/+/HEAD/sdk/android/src/java/org/webrtc/MediaCodecUtils.java#33 and make a custom build of webtc that should allow playback in API 28 and below emulators. Am working on getting it for 29 and above soon.
The Android emulator will show a blank screen with h264 video, since webrtc for Android does not enable h264 hardware encoding/decoding by default. You will need to use a physical device or build webrtc to use h264 software encoding/decoding. AFAIK this is the best guide to do that. You will need to translate it from Chinese. Keep in mind that this quirk also causes the video to show as blank on devices without the appropriate hardware (generally a Qualcomm or Exynos chipset)
Related
I am developing an advertisement application which plays multiple videos. I have faced a very strange problem: nor the simple Video nor the StageVideo are not visible when I run the app on target android device. Even FLVPlayback is not visible.
I can hear the audio but the only way to get the video is to press back button and then get back to app. In this case the video is displayed on the top of the rest display objects. This happens only on a target device which is a chinese sibo android tablet. It has android 4.1 on board. As I see a lot of people had the similar issue with different devices:
http://forums.adobe.com/message/5429125
but the solution they have mentioned there -adding true to the manifest xml doesn't fix my issue.
Adobe also advises to do it
http://forums.adobe.com/message/4914005
I am using adobe air 4.0 sdk and the air 4.0 runtime on the device. I have tried to change renderMode to CPU/Direct/Auto but it doesn change anything.
The other three android devices I have - toshiba thrive tablet(4.0.4)/ eken tablet(4.2.2)/ htc desire c smartphone(4.0.3) play all the video content just fine.
I guess the problem is re: their custom firmware(it auto hides all system bars..etc in order to make it work in 'kiosk' mode) but wanted to try all the variants before give up on this.
Any advice will be highly appreciated.
Thanks,
Max
After hours of scouring I did find a solution for AIR 4.6.0.
add backgroundAlpha to application node in the FLEX xml:
<s:Application backgroundAlpha="0.0" ... >
in the app.xml, change the namespace to highest version (3.7)
<application xmlns="http://ns.adobe.com/air/application/3.7">
and under the <android> node, add this
<containsVideo>false</containsVideo>
these are the references I found:
https://community.adobe.com/t5/flash-player/12-11-2012-air-3-5-runtime-and-sdk-update/td-p/4661723
https://help.adobe.com/en_US/air/build/WSfffb011ac560372f2fea1812938a6e463-8000.html#WS1B1ABBB6-F1D9-43f0-BC3E-0135F15FFAC4
No video when using spark VideoPlayer AS3
https://issues.apache.org/jira/browse/FLEX-33856
https://issues.apache.org/jira/browse/FLEX-33896
I have found a way how to force this unfriendly tablet to play the video in Adobe Air app by encoding it into FLV format and then embedding it into a swf via Flash pro. In this case I had to sync the app and video framerate(24fps). I have also set usingVideo flag to false in app descriptor.
Playback quality and performance are not very good but it's the only working method at the moment - I guess those can be improved by tweaking flv encoder params.
Update 4/3/2014
As the video playback embedded into swf was awful on the target device I have decided to download all the android versions of air runtimes starting from 3.1 and test normal video playback on these. Finally I have got the following results:
3.1.0.557 - NO
3.2 - YES
3.3.0.365 - YES
3.4.0.254 - NO
3.5.0.60 - NO
3.6.0.609 - NO
3.7.0.186 - NO
3.8.0.147 - NO
3.9.0.141 - NO
4.0 - NO
In the end I have found the solution - I have uninstalled all modern versions downloaded from google play and installed 3.3.0.365. I think my experience can be useful for those who develop AIR apps for android where target devices are noname low-end android tablets.
PS. I found another possibility to make video playing by using an swf embedded into an html page and displayed by StageWebView but this method has so much obstacles(FP security rules, ExternallInterface barriers) so it has no sense to implement it.
We are evaluating Delphi XE5 specifically to see how easy it is to develop mobile apps. We have developed a simple Android app that scrolls through a TClientDataset using a DBNavigator. The application comprises a few input fields, labels and slider controls (TSwitch).
Everything works ok and sliders (animations) are responsive, except on a Google Nexus 10 (Android 4.3) where everything happens in slow motion. It is like the app is still running in emulator mode. (A sliding button takes over 2 seconds to move from left to right!)
We have successfully tested the app on a Samsung Galaxy S3 (Android 4.1.2) and a HTC One (4.2.2) and the UI is as responsive as one would expect.
Update.
We asked the question at Code Rage 8 and they are referring it to the R&D Department. Will update when or if we get an answer.
I see mention of the screen resolution in comments. Has it actually been determined that it is the screen resolution that is the issue here?
Can you go into the developer options on the Nexus and try anything there that forces GPU usage or whatever might potentially help things along graphics-wise?
And is there anything clue-like in logcat? Run monitor.bat in the Android SDK tools directory or, if the path to it has spaces in, then that won't work so run ddms.bat instead from the same location (DDMS doesn't abort due to spaces in the path).
It would be good to get more evidence on the problem, rather than (educated) guesswork.
If it turns out to be screen size, well that will be interesting for Embo.
I am using androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash with VirtualBox-4.2.12 and Genymotion v1.0 in Windows 7 x64.
It is a fast VM emulator for android (Fast Startup, Fast APK Upload and Fast Debugging). But it has some problems.
One of the problems is apps icons. As you can see they are big and not well-formed:
Another one is the keyboard input that is not in English:
( Although the language & input setting is in English (US) )
Is there any workaround for these issues?
The icon size is probably due to a strange resolution you configure. The AOSP launcher does not support well not standard screen formats.
Also, it seems that you run an AndroVM virtual machine.
Try to use instead, the default templates offered by the player (the application that comes with Genymotion). Update it (because since the last week the version is 1.1. And download the templates you want to use. It should work.
About the keyboard, I think it has been solved on 1.1. If not send a message though the support page : https://cloud.genymotion.com/page/support/#
I`m new in Android development. I work with Android version 4.x, and it has emulated web cam with very low resolution, like 640x480.
I need to make an emulated webcam so it will work in high-def modes, like (4320x2880). In android 2.x I used variables hw.camera.maxHorizontalPixels and hw.camera.maxVerticalPixels, but it looks like they don't work any more in Android 4.x emulator of webcam.
Please assist, how to set high-def camera resolution in new emulator.
Short form: there does not appear to be an option for this today.
Long form: devices.xml, in your Android directory (e.g., ~/.android/), uses this XML schema an XML schema that I cannot find anymore. The only configurable options for the camera appear to be location (front/back), flash, and autofocus. Since devices.xml is what now controls what your emulator behaves like, it would appear that there is no equivalent to the old resolution options.
How can I build a standard ADV to test my Hello World app. I've just built my Hello World app on Android - using eclipse, and am having real problems getting the AVD to work properly. My setup Android 3.1 level 12, and I set the skin to 800 x 600 as the default WXGA, seem to make a massive screen. When it loads, I get just the Android screen but no side keyboard.
In addition, why do I get completely different looking skins when I play around with the skin size. Sometimes, I get a nice sea scape sometimes, but its portrait not landscape - how do I turn it? One time I get a lock?
Any help would be really appreciated. (I using Java 1.6 64 bit).
Thank you very much.
Ed Ryan
My setup Android 3.1 level 12, and I set the skin to 800 x 600 as the default WXGA, seem to make a massive screen.
Use the scale option when launching the emulator to resize it to something manageable. There are no 800x600 Honeycomb devices, so you are far better served using WXGA.
When it loads, I get just the Android screen but no side keyboard.
Correct. You won't get the side keyboard for WXGA, either. You do not need it, as everything on that side keyboard is available to you from your own physical keyboard on your development machine.
The skins are only available for the out-of-the-box skins or the ones you create manually (see here). However, you can access all of the keys using other keyboard shortcuts, which I personally found way more convenient. Plus, you save space.