Endoscope app USB DEVICE DETACHED when open LED light? - android

I've developed an Android App Supports Endoscope using library UVCCamera.
Everything working properly but when using the camera with LED Light, a moment later the camera will disconnect and show the message "USB DEVICE DETACHED". This error also cannot find and not show in log console.
When I tested the app with similar apps in the Google Play (CameraFi, UsbWebCamera), I also found the same problem.
Any suggestion about this?
This link is video I recorded. https://www.youtube.com/watch?v=BkXbZo6AO8c
I using Samsung Note 2 and Redmi2 in test.
Thank you.

Related

Is the Sony Android camera API supported for all Android versions?

I'm wondering if the Sony Camera API has parts that are only supported by certain versions of Android.
I have the latest firmware (1.04) on my a6500 and running Android 7 on LineageOS (successor of CyanogenMod) for the Samsung S5 (KLTE version). This is what I get in my Play Memories app:
The shutter button works and images download to the phone. But that's it.
Additionally, when I use another app called DSLRDashboard, the settings show up and can be changed on the app, but they don't get changed or applied on the camera, and this is in full manual mode on the camera. Other modes don't work either.
What could be causing this? What would need to be added into a 3rd party ROM like LineageOS to get this working?
Really hoping that the official Sony developers that roam this site will be able to chime in.
So, a bit of a snafu on my part.
It's not enough to update just the firmware on the Sony camera. The Remote Control app installed in the camera must also be updated as well, which means hooking the camera up to WiFi and downloading the updates for that app. With that done, all the settings appear in the phone app and can the changed.

Android wear watch face rejected - "basic functionality"?

I submitted my first android wear watch face to the Play store last night, but it got rejected. The reason in the email was simply:
Eligibility issues:
-Basic functionality of your app does not work as described. Be sure to test your app on a variety of different Android Wear devices and
configurations.
Please refer to the following developer pages for details:
https://developer.android.com/tools/testing/index.html
https://developer.android.com/training/building-wearables.html
How can I find out more? It works fine on my own watch, and a friend with a different watch tried it and it was also fine. I've tried it on the emulator with a few other screen sizes, and it works there too. I don't see anything in the developer console that lets me see what tests they did that failed, so I don't know what to do to fix it!
OK, after submitting via the "hey, you rejected me in error" link, I got another rejection email, but this one had the magic line "Crashes on ASUS Zenwatch".
Some googling led me to discover the Asus uses "Low-bit ambient mode". I then discovered in my Huawei developer options I can force that. Did so and hey presto- it crashes!
At least I have a stack trace now and can fix it.

Using audio recorder at android simulator

I want to use an audio capture feature at my app. I followed this link at developer.android.com.
I'm using Android Studio 1.4 and a Nexus 5 with Api21 as virtual device. At developer.android it is descripted that it's not possible to use the audio capture feature with an simulator:
Note: The Android Emulator does not have the ability to capture audio, but actual devices are likely to provide these capabilities.
But is this an information that is up to date? I'm able to use the record button but the activity crashes after pressing stop. I can see the audiorecordtest.3gp file on the simulated device and if I save it to my computer I can play my recorded audio. The crash comes without any shown exception. If I ask for
context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_MICROPHONE);
I got back a true. It seems like the simulator is able to capture audio but can't handle correctly the stopping of it? Is there a way to get around?
One aspect of Tamper Checking involves testing for an Emulator running your app...
In THIS article (Paragraph 4.1), Emulator detection is described... The tests detect many emulators, but throw some "false positives", depending on the device.
False positives render some emulator test's, described in the article, not appropriate for production, but are fine in a test environment where you know your devices and their test responses.

Chromecast API doesn't accuratelly detect when device is connected/disconnected

I have a problem when i am trying to use my chromecast device.
Currently I have an app for Android , one for iOS
and these 2 apps from github.
https://github.com/googlecast/MediaRouter-Cast-Button-android
https://github.com/googlecast/CastVideos-android
All of them have a common problem. They sometimes cannot accuratelly tell if a chromecast device is connected or disconnected.Taking around a minute before they find it out themselfs.While an application like Youtube , discovers if it is connected or not, instantly.
EDIT #1 START:
While using the application "Cast Videos" for android from GitHub the following thing happens.
I hold the android device in my hand (Samsung Galaxy S2).
I know chromecast is on because I can see it on my monitor.
I start the application "Cast Videos".
The Chromecast icon does not appear, even if the chromecast device is on.
EDIT #1 END;
I have tried using the app_id from my own receiver application , and the default receiver app_id.
I have found a way to trick them into finding the device. By launching the youtube application on an Android or iOS device , connect to the chromecast device , then disconnect.
When I return to on off the apps I have mentioned at the start of the question , they can detect it now , and connect to it.
The two applications from github are not modified , and use the most up to date support libraries (appcompat, mediarouter, CCL).
The applications are now being currently build on a Mac (if that matters). I don't think it will be of any difference if they were built on Windows or something else.
EDIT #2:
I am starting to suspect that actually the wifi router in the building im programming may cause these connection problems. Because when I send the app to other people they don't have the same problem.
EDIT #3:
Good news :D.
The latest update on the castcompanionlibrary made chromecast detection much more reliable and the sample now detects preciselly every time if it is connected or not.

chromecast device recovery issue

I am working with chromecast device.I am working in android native app. I am in too much trouble with this. I have tried all sample projects that are available on Github. Try to make my own app.
here are steps which I follows.
GoogleCastSdk
mediarouter library
AppComp Library
Whitelisted My device Properly
Set chromecast app as"Send the serial # when checking for updates"..
I have also checked that my device is properly whitelisted with chromecastIP:9222.
But In every sample or my own app I am facing an issue. Chromecast icon is Enabled as there is chromecast Device.. But cant discover my device listed there..
Is there any thing that I am missing??
Any help is this case where I am wrong would be highly appreciated.

Categories

Resources