I'm encountering a very strange problem while developing on android. My project is a bit unorthodox, so please bear with me.
I'm developing a game that uses an external controller that's connected to the phone using an OTG cable. All works OK, until the phone's temperature crosses a certain threshold, In which case the operating system shuts down the communication with the OTG and I'm unable to restart it in any way other then disconnecting the OTG cable, and reconnecting it, which is a process I would really like to avoid.
So my question is does anyone know what part of the operating system is the one performing this action of shutting down the USB input when the device gets overheated, and where can I control\reboot it?
Would very much appreciate your help, as I don't even know where to start looking, just please avoid answers like "just unplug and plug back the otg", or "just make sure your device doesn't overheat"
Much obliged
It's probably a hardware issue. If it's actually implemented in the OS itself, then you should probably look in the kernel code. It's not the standard behavior in all android devices, so you should try using another device.
Related
I'd like to monitor my bluetooth traffic on my andorid device.
I have tried this stuff:
Sniffing/logging your own Android Bluetooth traffic
But sady, i still cant find the saved file. The only File I can find is in the /sdcard/Android/data/ folder. But this file is empty and old.
I turned bt off to switch the tracking functionality on and turned it on again when started. Same when i was finished.
Oh, and its said that the phone doesnt need to be rooted. I've found an app which does the same but needs the phone to be rooted... so maybe i also need to root it to make the androids built in feature work?
And I tried this on an s10 and s7.
I hope someone can help me out here.
Have a nice day and thanks for reading :)
I trying to make a android App, that uses an usb device that need the tablet to be in HOST mode, so it can get power from the tablet. For some odd reason, this only happens every other time I restart the tablet and only if I have the power jack inserted.
So The solution I'm trying to make, is to find out after a reboot if the tablet is in USB Host mode and if not, then reboot automatically.
The tablets are rooted, so superadmin access is no problem and my reboot code is working fine, just can't seem to find anything that says how I can detect Host mode, can anyone share this knowledge with me?
Thanks in advance
Peter
releaseInterface() and close() closes the connection and stuff. I think then you should be able to getDeviceList() or soemthing.
I can't be too sure, since I used slickdev library to connect to my serial device, but this answer is based on data of this page:
http://developer.android.com/guide/topics/connectivity/usb/host.html
Is it possible to connect an Android smartphone working a host to a computer (working as a device?) I am writing an app that is supposed to remote control a camera via smartphone. I have some trouble testing my app since emulators don't support usb connections. But when I connect my smartphone to the camera I can't really tell what goes wrong. I thought of connecting the phone to a computer so that it could e.g. display the characters it is receiving but I don't really know if it would work, as computers usually work as host to other devices, not the other way around.
Thanks a lot for any tips.
You might wanna take a look here http://developer.android.com/guide/topics/usb/host.html
Altho as mention somewhere no google io mobile in android 3.1 didnt support host mode, maybe this has changed in 4.0 which might be true basing on this video http://www.youtube.com/watch?v=sQGxckZkH2g
A computer cannot act as a Device. If you want to see what is happening on your smartphone when you connect your camera, use the
adb shell dmesg commands to look at the logs and see if the camera is being detected.
I am new to android development and I have been having problems with disconnecting my smartphone from my ubuntu development platform running Eclipse. When I initially plug my phone in with the usb, the system sees it and all is well. However, if I disconnect it from the system and then plug it back in, the system does not recognize it. I have been rebooting the system everytime it does this. Is there a way to "safely" unplug the phone without having to reboot? Should I close Eclipse? Do I need to "unmount" the phone or is there a way to "restart" the android.rules in the rules.d folder?
Any help would be appreciated.
I had the same issue, and simply turning Usb Debugging off, then back on solved the situation -every time-.
After a while, when I set the default connectivity to Charge only, the problem went away.
These are just workarounds based on my experience, but might help you.
I'm writing an application which is supposed to dump data on the SD card and then another application on a pc which should read the data when the device is connected to the pc (in disc drive mode).
On my HTC Legend there is a dialog to choose between: Charge only, HTC Sync, Disk drive..
Is there a possibility to set the mode with which the device is connecting to the pc
or at least an intent to ask the user to switch the mode?
I haven't found a way of setting the mode programmatically, but I believe you can bring up the settings menu programmatically by invoking the same activity that the system invokes from the notification area. Unfortunately this appears to be manufacturer-specific: on my phone it is com.htc.android.psclient.SwitchUsbSettings.
On HTC devices, open the ConnectToPC service (whilst USB is not plugged in) in Manage Apps (ICS - probably applies to Gingerbread too; don't remember), and hit Clear Data. Then, plug the USB back again, and you should have the option to "Don't ask again" available. Select your desired mode, check the box, and accept.
CompanionLink does this when you request a USB sync in their android app: it flushes data to SD, then exports the SD as storage (a "disk drive") on the USB, then waits for the user to manually signal the android app when the PC is finished using the SD, and then undoes the SD export to USB again. Though the CompanionLink app can be very frustrating to use, at least this part of it is (largely) reliable.
Unfortunately I don't know the technical details, may well need to figure them out myself one of these months. If you can't get any traction with android docs, perhaps you could study what CompanionLink does on android to implement this. The sequence I describe above is when it is configured to sync over USB against a (PC-based) Palm Desktop.
As an aside, it appears that the reason for this highly-convoluted process is that the SD card's FS is accessed directly and at least the presently-used card FAT FS can only support a single client: the phone itself or USB. imo it would be extremely helpful if concurrent shared access to the SD were possible, but this would likely require deep android changes.
For anyone having this issue with an HTC One M8, this is a bit off the wall, but makes the point to think outside the box. A USB connection resulted in the device charging, that was it.
The solution was the combination of a different USB cable, uninstalling an application called Battery Doctor (which apparently likes to manage everything around your battery), AND USB Network Setting - turn ON Smart Network Sharing...Seemingly unrelated...but this combination got my connected with MobileGo for Android to manage and back up files,contacts and settings.
Hope this helps someone.
Yes .In Android there is a way to change the behaviour of the devices`s USB mode when the device is connected with the PC.
I used a Motorola Milestone[running 2.1] and i was able to switch between the following modes :
PC Suite[developed by Motorola],MemoryCardAccess and Charge alone.
If you need to access phone memory I think you should turn ON "USB Debugging Mode " in your device.Am not sure about it though,I feel it may be handy !!