Android detect car charger - Android Software Development

Is there a way to detect when i plug car or home charger ?

Try the docs here:
http://developer.android.com/reference/android/os/BatteryManager.html

Related

problem charging using car charger

ok so i bought a universal car charger (link: car charger) and when i plug the charger to the 12V port of my car, my phone shuts off and it wont turn on. when i unplug it it turns back on automatically.
plugging into wall charger or computer usb works fine, so i dont think its the battery.
anyone having the same problems with car chargers? is there any setting for this? or is it just the charger i bought?
- Rooted phone, using CaNNoN202 Eclair ROM.
thanks.
Probably it's a generic POS charger. I would either buy a Magic-specific charger, or buy a lighter socket > USB converter. That's what I use and it works perfectly.
raduque said:
Probably it's a generic POS charger. I would either buy a Magic-specific charger, or buy a lighter socket > USB converter. That's what I use and it works perfectly.
Click to expand...
Click to collapse
yeah, that's what i was thinking.
i guess i'll have to return these and get a USB converter for the ligther socket. your phone doesnt turn off when you plug it in right?

car charger wont work on froyo, but works on any other rom.

so i updated to 2.2 today, phone charges with my wall charger just fine, i get in the car and the car charger wont charge the phone for some reason. i restored a nandroid of my CM 5.0.6 rom and plugged the phone into the car charger, and oddly enough, it started to charge.
having the car charger is a must for me, is there anyone else with this issue? or any possible solutions?
no one else had this issue?
weird.
are you referring to the car dock or connecting your usb to a usb cigarette adapter?
Tortri said:
are you referring to the car dock or connecting your usb to a usb cigarette adapter?
Click to expand...
Click to collapse
usb cigarette adapter
Sounds like it's under powered and isnt' registering it. if you can try a different usb cable / cigarette adapter.

[Q] Car Dock (or lack of) Recognition?

This has happened a few times now where I plug in a generic charger in my vehicle and I get a message in AutoGuard that it says it's recognizing a car dock.
So that brings me to the question, how does it recognize that there's a car dock? I'm guessing in the genuine Samsung Car Dock there's something in the dock itself that tells it it's a dock. But with that said, how come it's periodically recognizing it when I use a cheap generic car charger?
Strange...
Any tricks to let it go into car dock mode when plugging in a charger in my vehicle?

[Q] Nexus7 charging issue

My N7 shows charging when connected with wall charger but actually its its not charging because battery is draining as it does with out charging.
following are my findings
its happening with both wall charger and PC usb port
wall charger is fine because its changing other devices
USB cable is correct because its working with other device and i can transfer files to N7 when connected to PC
i charge my device by using pogo pins 1and4 with wall charger. i test the connectivity between pogo power pins(1 and 4) with micro usb power pins.it seems that -ve pogo pic connect with -ve micro usb pin internally but positive pin pogo pin shows no connectivity with usb jack +power pin.so it seems that +ve power pin of micro USB jack is defective. Please help me how to fix that.
I'm currently in Karachi Pakistan and N7 was bought from USA from Google play store on September 1st. Please advise should i send it back to USA again to claim warranty or try to fix it buy opening it and replacing port because apparently +ve terminal of port is not working.

Nexus 6P, Android Auto, faster charging question?

So, my 2014 Kia Soul has a new map update that is arriving in the mail tonight, and it includes Android Auto. I know I have to connect my device directly to the USB plug in my car to use it, but I have some questions for everyone.
I want to be able to keep my phone QUICK charging at 3A but also connect for the USB requirements for Android Auto. I also have a 32gb micro sized USB drive I'd like to keep plugged in, as it is loaded up with great driving music. I can live without the USB drive if needed, but really want to keep the ability to quick charge.
If I use an adapter like this one.
https://www.amazon.com/gp/product/B01A6ZPHAQ/
And connect the Type C connector on that to my phone, and then the Type C USB charger in my car to this, can I connect a Type A male to Type A male cable to satisfy Android Auto?
I hope this makes sense. I'm thinking it'll work, but maybe someone else has tried it. I have this adapter from some testing I did, but don't have a male to male type A USB cable to test out with yet.
I am almost sure it won't work. And where will you get 3A power to quickcharge? Cars usb are not prepared for that.
I would get to 3 amp power from where I get it now, the quick charger that I put in my car as mentioned above.
So the USB C cable would go from my current charger to the USB C in port on this adapter, which is designed only for charging through that port, then a USB A to USB A cable to connect the car USB port to the USB A port on the adapter.
I picked up a short USB a male to male cable earlier today so I can test this on Friday.

Categories

Resources