Disable/Enable OTG by Code - Android Q&A, Help & Troubleshooting

Dears,
I m looking for some help to implement the following feature on Android 9.0, and it will be running on MTK based mobile.
1. disable the otg function once the screen is off. then enable otg once the screen is on.
2. provide option on the settings to control this feature .
3. make application contains one button to enable/disable otg
the idea is we will connect some devices to the mobile. and we need to control the battery consumtion, if the mobile is not used (screen is off) we disable the otg. so the device will not consume the mobile battery.
any one can help on this or give some ideas
Regards.

Any update about this topic?

Related

How to keep screen on when charging/connected to USB?

I don't know why Samsung removed this option in display/dev settings but does anyone know of a way?
I downloaded an app called 'desk home'. This app goes into desk home' mode when you connect it to a power source.
I have a Tasker profile set up to do this.
NZtechfreak said:
I have a Tasker profile set up to do this.
Click to expand...
Click to collapse
How did you set it up in tasker?
Condition is a State based one: Power - USB power, then the Task is just Display --> Stay On --> Stay on with USB power. I presume its just as easy to have it stay on with any charging method.

disabeling Battery

does anybody know how to disable the battery on my Archos A101 - I am running the device alway connected to the powersupply - when i switch of power i want the device to switch of - i cannot use tasker because i need this when the device OS crashed - in that case no application is running so i want to kill it by switching of the power -
maybe it is hard to understand what i mean - but maybe someone can help me ;-)

WakeUp on power connect - using HD2 as car navi

Hi all,
I would like to use my HD2 as car navigation only.
I was looking for app to wake up device on power connect. Maybe someone found something similar ? Or maybe there is some custom rom or app which will change my HD2 in cool car navigation
Thanks in advance.
Mariusz.
How about running magldr? Phones with magldr inatalled cannot charge when off, so magldr wakes it up when power is detected.
(Course, it would mean running android/wp7,)
on the rom in my signature my hd2 does wake up when power usb or charger usb connected.
@samsamuel: Unfortunately I need WM 6.5.
@Mister B: On stock rom WM wakes up only when it is connected to PC. When it is plug in to charger nothing happend ( except red light notification ). It's seems that I need to flash with something else than stock rom
On my custom rom 23699 it wakes up on any charger I used too.
Also take a look at mortscript thread as a few scripts were made purely for navigation related use making it rotate display & launch nav app ect when connected in car ect.

Masrshmallow - lightweight way to allow phone rotation when X BT dev is connected

Hi guys,
Running CM13 on mako (nex4)
I wanted to know if anyone knew of a lightweight way to do this... I could do it in tasker for instance, but maybe there is a better way.
(CM's profiles dont allow enabling rotation)
I want my phone to allow rotation / disable rotation lock when my car stereo is connected via bluetooth.
I cant find any simple option that will allow this.
Is there a lightweight way to do this nowadays? Or will I have to get some kind of tasker solution going?

[Q] A few questions about mate 10 pro

1. What are default preinstalled apps on this phone ? Interested in knowing all third party apps, such as social networks and so on.
2. While not having real hardware navigation buttons sucks and is one of the biggest flaws in most new phones, i am interested in software navigation bar - is it possible to set software navigation bar to permanently stay in one position, no matter how phone is rotated ?
3. As i understand, mate 10 pro fingerprint scanner is worse than the one in mate 10, which can be used for navigation, and mate 10 pro fingerprint scanner cannot be used for navigation ?
4. What is the speed of internal storage ? What is the files transfer speed via usb cable from pc to phone and from phone to pc ? I know some phones have usb3 connections, but transfer speeds are very low, like half of the speed of usb2.0 connection...
5. How about burn in pixels on screen from navigation bar ? Will it be a problem or not ?

Categories

Resources