If possible, I'd like to find or code a widget that toggled the speakerphone setting for the car dock, since the stupid thing always forgets it should be checked.
Most of the widgets I've seen are pretty good at firing whatever intent is necessary to get to the appropriate settings (or better yet, toggling it directly).
Does anyone know how to easily discover what intent is fired so I can code a widget and not have to do the following steps during a phone call?
Arrow right to second dock page
Tap Settings
Tap Systems Settings
Scroll down to Dock
Tap Audio
Tap Speakerphone option to check.
Why do ppl keep on doing this plz post this in the right area. the devs are going to move this to Q&A.
Hold up.
So you're saying that "Nexus One Android Development" is NOT the place to ask an API/Development question?
When I ask for an Intent I'm asking for information about something I am perfectly willing to CODE.
Or is "Nexus One Android Development" only for ROM development related questions? Cause if so, they should just rename it: "Nexus One Custom ROM Development" so as not to confuse developers asking hacking/developer questions for app dev.
Randy
I use locale app. and a plugin called locale power source. I have definied what to happen when i plug on power i do that in my car. It's also starts when plug power in at home, but i can live whit that.
Sent from my Nexus One
well, you might not need to code but if you do, i'm sure some ppl would appreciate it. the reason i say you might not need to code is that I know the issue you are talking about and i have experienced it off and on (no pun intended) but since frf83 i haven't experienced the problem and I use the CCH (custom car home) app which is free in the market. it has a settings page that allows you to lock it on speakerphone when docked as well as bluetooth. Another option is using quickdesk. just put dock setting son your quick desk page and although it might take you 3 key strokes to turn on speakerphone it might not be as bad as writing code for a widget that will take up memory and still make you do at least one key stroke. but if you write the code, i'm sure it'll be appreciated.
Did you try decompiling with apktool and looking at the manifest?
No but I definitely will try that. I did find an app that is open source and looked at the code. It uses the AudioManager class and sets the speakerphone option on when it receives the dock intent. However, it is not at all clear from that or the Android documentation that this reroutes audio to the dock speakerphone instead of the one in the phone. I do not believe that it does so I need to determine how the dock app apk sends an intent to bring up those settings. I was hoping someone with experience coding toggle widgets such as gps, lock etc discovered how to bypass the ui and pragmatically change the settings in an arbitrary app.
Randy
Sent from my Nexus One using Tapatalk
eViL D: said:
Did you try decompiling with apktool and looking at the manifest?
Click to expand...
Click to collapse
Did that to GoogleCarHome.apk. Found the manifests file, and I see that it looks for the CAR_DOCK events, but there's no source
So I either need the Java source to it that shows which setting it's getting to determine the off/on state, or the Java source to the Android settings app which sets this independently of the Car App.
I'll continue ripping stuff apart until I find it. If it's in the Settings I wonder if that means it's part of AOSP. If so that might be the way to go. However, I'm not on a Linux box and am not equipped to do native Android development, just APK development using Eclipse + SDK.
Randy
Prod1702 said:
Why do ppl keep on doing this plz post this in the right area. the devs are going to move this to Q&A.
Click to expand...
Click to collapse
I disagree with what you are saying enough to post a reply to it.
The OP is asking a legitimate development related question.
Darn, so nobody knows?
My X is paired to my 2013 F-150 via SYNC and it automatically adds the voice, media and message features upon connecting. However, every time I get a text, SYNC stops everything to tell me I have a new text message, and it's annoying. You can turn MAP off temporarily by manually disabling it while the phone is paired, but once it re-pairs with SYNC, it automatically activates MAP again. I do use the voice and media though.
My question is this... is there any way to permanently disable the MAP feature on the X? I don't use it and never will. I always check my phone when a new message arrives or wait until I'm at a stop. I just want to be able to be able to remove the MAP feature.
triton302 said:
My X is paired to my 2013 F-150 via SYNC and it automatically adds the voice, media and message features upon connecting. However, every time I get a text, SYNC stops everything to tell me I have a new text message, and it's annoying. You can turn MAP off temporarily by manually disabling it while the phone is paired, but once it re-pairs with SYNC, it automatically activates MAP again. I do use the voice and media though.
My question is this... is there any way to permanently disable the MAP feature on the X? I don't use it and never will. I always check my phone when a new message arrives or wait until I'm at a stop. I just want to be able to be able to remove the MAP feature.
Click to expand...
Click to collapse
You can probably unpair (from both the phone and sync) and then repair and when you repair just deny the MAP access request.
Also, you should be able to turn off new message download in Sync
triton302 said:
My X is paired to my 2013 F-150 via SYNC and it automatically adds the voice, media and message features upon connecting. However, every time I get a text, SYNC stops everything to tell me I have a new text message, and it's annoying. You can turn MAP off temporarily by manually disabling it while the phone is paired, but once it re-pairs with SYNC, it automatically activates MAP again. I do use the voice and media though.
My question is this... is there any way to permanently disable the MAP feature on the X? I don't use it and never will. I always check my phone when a new message arrives or wait until I'm at a stop. I just want to be able to be able to remove the MAP feature.
Click to expand...
Click to collapse
Did you ever find a solution for this? I just got a '14 Raptor and it does the same damned thing. I've deleted the phone pairing and repaired and deny access when repairing but it still automatically connects to all 3 protocols when I get in the truck. My phone is actually an LG G3 but it seems to be an android problem and not a specific phone problem.
boosting1bar said:
Did you ever find a solution for this? I just got a '14 Raptor and it does the same damned thing. I've deleted the phone pairing and repaired and deny access when repairing but it still automatically connects to all 3 protocols when I get in the truck. My phone is actually an LG G3 but it seems to be an android problem and not a specific phone problem.
Click to expand...
Click to collapse
Nope. I also got a '14 Focus ST and the bluetooth "feature" is even worse on it. Since I have the full touchscreen, it will now display the notification that I have a text, and who it's from. Again, you can temporarily disable it on the phone but not permanently.
triton302 said:
Nope. I also got a '14 Focus ST and the bluetooth "feature" is even worse on it. Since I have the full touchscreen, it will now display the notification that I have a text, and who it's from. Again, you can temporarily disable it on the phone but not permanently.
Click to expand...
Click to collapse
Yeah that's exactly what I'm getting in my 14 Raptor. Terrible, I guess I have to disable it every time I get in the car now.
triton302 said:
Nope. I also got a '14 Focus ST and the bluetooth "feature" is even worse on it. Since I have the full touchscreen, it will now display the notification that I have a text, and who it's from. Again, you can temporarily disable it on the phone but not permanently.
Click to expand...
Click to collapse
Do you guys have root? if so maybe you can try something. but keep in mind I have not tried this myself and also I could be completely wrong.
Anyway, I noticed in my moto x build.prop file (that sets the phone settings on boot) that one of the lines seems to disable Bluetooth SAP on boot. The line is
ro.qualcomm.bluetooth.sap = false
if that can turn off SAP maybe
ro.qualcomm.bluetooth.map = false
can turn off MAP on boot.
Keep in mind editing build.prop the wrong way can give you boot up problems. Backup the file, and also keep track of and set the appropriate permissions for the file.
In fact, it's probably better before editing build.prop to try the setting on the fly. In a terminal emulator with SU enabled try the line
setprop ro.qualcomm.bluetooth.map false
then check that with getprop and with your car.
this is safer if you have any problems you can just reboot. if it works you can proceed to build.prop
dtg7 said:
Do you guys have root? if so maybe you can try something. but keep in mind I have not tried this myself and also I could be completely wrong.
Anyway, I noticed in my moto x build.prop file (that sets the phone settings on boot) that one of the lines seems to disable Bluetooth SAP on boot. The line is
ro.qualcomm.bluetooth.sap = false
if that can turn off SAP maybe
ro.qualcomm.bluetooth.map = false
can turn off MAP on boot.
Keep in mind editing build.prop the wrong way can give you boot up problems. Backup the file, and also keep track of and set the appropriate permissions for the file.
In fact, it's probably better before editing build.prop to try the setting on the fly. In a terminal emulator with SU enabled try the line
setprop ro.qualcomm.bluetooth.map false
then check that with getprop and with your car.
this is safer if you have any problems you can just reboot. if it works you can proceed to build.prop
Click to expand...
Click to collapse
Great idea, however I just tried it with no avail.
I just thought of something as well... my fiance has a '13 Focus SE with the base stereo, and she has the same model phone as me (VZW X Dev). Her SYNC doesn't alert her to new messages, but my truck with the same SYNC setup did, but I figured my truck had a more recent version of SYNC. I dunno, all I know is it's annoying as hell and I'd like to find a more permanent solution. Especially since I'm contemplating on buying the Droid Turbo in the future and I'm sure it will do the same thing.
triton302 said:
Great idea, however I just tried it with no avail.
Click to expand...
Click to collapse
That sucks... Just to clarify I assume you tried this with a terminal emulator. did you remember to give it root before running the setprop command? i.e. type su and enter. without root setprop will appear to go through but won't actually set anything. And if it's set properly, getprop ro.qualcomm.bluetooth.map should return false like it does for SAP. otherwise it will return empty.
Another thing that might or might not make a difference, was Bluetooth on when you tried this, if so try it with Bluetooth off.
As for the difference between the two SYNCs my guess is you're right the version difference could be affecting something. A quick Google search suggests some versions of SYNC have a setting for MAP. in SYNC menu check System Settings -> Advanced -> MAP Profile
dtg7 said:
That sucks... Just to clarify I assume you tried this with a terminal emulator. did you remember to give it root before running the setprop command? i.e. type su and enter. without root setprop will appear to go through but won't actually set anything. And if it's set properly, getprop ro.qualcomm.bluetooth.map should return false like it does for SAP. otherwise it will return empty.
Another thing that might or might not make a difference, was Bluetooth on when you tried this, if so try it with Bluetooth off.
As for the difference between the two SYNCs my guess is you're right the version difference could be affecting something. A quick Google search suggests some versions of SYNC have a setting for MAP. in SYNC menu check System Settings -> Advanced -> MAP Profile
Click to expand...
Click to collapse
The newer SYNC version doesn't have that MAP option, that was the first thing I found when googling as well. (and for the record I don't have a moto, I'm using an LG G3 and found this thread while searching for a solution). Unfortunately my build.prop doesn't have those lines in it. Not sure if I could just add the MAP entry or not, that's above my knowledge base
boosting1bar said:
The newer SYNC version doesn't have that MAP option, that was the first thing I found when googling as well. (and for the record I don't have a moto, I'm using an LG G3 and found this thread while searching for a solution). Unfortunately my build.prop doesn't have those lines in it. Not sure if I could just add the MAP entry or not, that's above my knowledge base
Click to expand...
Click to collapse
well without putting in commands manually I see two things you guys can try. the first doesn't need root while the second one does.
1) turn on Bluetooth on your phones, then go to Settings -> Apps -> Running -> Bluetooth Share then just Stop the Map service. This method will stick as long as you don't turn off Bluetooth and start it again, and as long as you don't restart the phone. if you do either you'll have to do the stopping again.
2) this requires that your phone be rooted, but on the plus side it might be more permanent. There's a nifty app in the play store made by some benevolent developer that claims to disable any service started by any app. appropriately enough the app is called Disable Service. You open the app, slide over to the System Apps section, find Bluetooth Share and click it, then just uncheck the Maps service box. So simple, but won't work without root. Try it with Bluetooth off and if that doesn't work reset it then try it with Bluetooth on. But word of caution you don't want to go messing around disabling other things unless you're sure of what you're doing. disabling the wrong thing will cause you problems.
https://play.google.com/store/apps/details?id=cn.wq.disableservice
good luck.
dtg7 said:
well without putting in commands manually I see two things you guys can try. the first doesn't need root while the second one does.
1) turn on Bluetooth on your phones, then go to Settings -> Apps -> Running -> Bluetooth Share then just Stop the Map service. This method will stick as long as you don't turn off Bluetooth and start it again, and as long as you don't restart the phone. if you do either you'll have to do the stopping again.
2) this requires that your phone be rooted, but on the plus side it might be more permanent. There's a nifty app in the play store made by some benevolent developer that claims to disable any service started by any app. appropriately enough the app is called Disable Service. You open the app, slide over to the System Apps section, find Bluetooth Share and click it, then just uncheck the Maps service box. So simple, but won't work without root. Try it with Bluetooth off and if that doesn't work reset it then try it with Bluetooth on. But word of caution you don't want to go messing around disabling other things unless you're sure of what you're doing. disabling the wrong thing will cause you problems.
good luck.
Click to expand...
Click to collapse
Thanks so much! Option 2 is exactly what I've been looking for! Option 1 doesn't work for me because I use Trigger and have conditional BT on/off and that would just recreate the same problem lol.
Just tried option 2... If any of those services are unchecked, Bluetooth itself turns off automatically and won't turn back on until that service is restored.
triton302 said:
Just tried option 2... If any of those services are unchecked, Bluetooth itself turns off automatically and won't turn back on until that service is restored.
Click to expand...
Click to collapse
Yep same here, tried it on my way home yesterday and the disable service app completely disables bluetooth if you disable MAP.
boosting1bar said:
Yep same here, tried it on my way home yesterday and the disable service app completely disables bluetooth if you disable MAP.
Click to expand...
Click to collapse
Wow no breaks...but not quite out of ideas yet. a few more to spitball, going from simple to more complex:
a) we've established there's no option to disable MAP from within SYNC under System Settings. What about under Phone Settings? Indications are there should be an option there to turn off Message Notification. If it's there set it to OFF. frankly I'd expect there to be such a setting somewhere in there.
b) reaching a bit here, but in Disable Service app I notice there's another system app that has Bluetooth service settings. the app's name is org.codeaurora.bluetooth (Apparently Code Aurora is the Qualcomm Linux kernel). No idea if this will work where the other failed but won't hurt to try. the service says BluetoothMasService but if you check the full name it is map (maybe service instead of profile).
c) this one brings out the big guns. not only do you need root, but you also need Xposed installed. if you already have Xposed then it would be quick to try. if not, just read up on it. anyway, with Xposed installed you need the AppOpsXposed module. when you have that up and running you open the App Ops screen of the Bluetooth Share app (a few ways to do that, doesn't matter how). in that screen you turn off all of Bluetooth Share's access to SMS. Basically you disable Bluetooth from interacting with Messaging. you revoke the permissions. Bluetooth will still work unaware that it can't access messages, and I figure if it can't access messages it damn well can't send them to the car.
There's another module that can do this more thoroughly, but App Ops is less scary/more user friendly.
that's it. personally I still prefer my original idea of figuring out how to do it manually thru setprop and build.prop, but if that's not an option then try these.
Roger, I'm off work today so I'll try these out here shortly.
EDIT: From what I recall, if you have a recent version of MFT, there are no options whatsoever for MAP, in phone or system settings. I'll double check.
EDITING EDIT: #2 doesn't work.
dtg7 said:
Wow no breaks...but not quite out of ideas yet. a few more to spitball, going from simple to more complex:
a) we've established there's no option to disable MAP from within SYNC under System Settings. What about under Phone Settings? Indications are there should be an option there to turn off Message Notification. If it's there set it to OFF. frankly I'd expect there to be such a setting somewhere in there.
b) reaching a bit here, but in Disable Service app I notice there's another system app that has Bluetooth service settings. the app's name is org.codeaurora.bluetooth (Apparently Code Aurora is the Qualcomm Linux kernel). No idea if this will work where the other failed but won't hurt to try. the service says BluetoothMasService but if you check the full name it is map (maybe service instead of protocol).
c) this one brings out the big guns. not only do you need root, but you also need Xposed installed. if you already have Xposed then it would be quick to try. if not, just read up on it. anyway, with Xposed installed you need the AppOpsXposed module. when you have that up and running you open the App Ops screen of the Bluetooth Share app (a few ways to do that, doesn't matter how). in that screen you turn off all of Bluetooth Share's access to SMS. Basically you disable Bluetooth from interacting with Messaging. you revoke the permissions. Bluetooth will still work unaware that it can't access messages, and I figure if it can't access messages it damn well can't send them to the car.
There's another module that can do this more thoroughly, but App Ops is less scary/more user friendly.
that's it. personally I still prefer my original idea of figuring out how to do it manually thru setprop and build.prop, but if that's not an option then try these.
Click to expand...
Click to collapse
I think we have a winner! #3 works perfectly.
I tested it with the phone unlocked and locked, rebooting the phone, toggling bluetooth on and off, turning the car on and off... seems to work every time. As long as you turn off just the SMS/MMS options, you can still have it send and receive calls and allow the device to remain unlocked while connected.
Ahhhh...... Success feels good...
Xposed is pretty amazing... It gives us a fighting chance lol.
if only they'd installed Xposed on Skynet things might have turned out differently...
dtg7 said:
c) this one brings out the big guns. not only do you need root, but you also need Xposed installed. if you already have Xposed then it would be quick to try. if not, just read up on it. anyway, with Xposed installed you need the AppOpsXposed module. when you have that up and running you open the App Ops screen of the Bluetooth Share app (a few ways to do that, doesn't matter how). in that screen you turn off all of Bluetooth Share's access to SMS. Basically you disable Bluetooth from interacting with Messaging. you revoke the permissions. Bluetooth will still work unaware that it can't access messages, and I figure if it can't access messages it damn well can't send them to the car.
There's another module that can do this more thoroughly, but App Ops is less scary/more user friendly.
Click to expand...
Click to collapse
Awesome, worked here as well!! I'd looked through xposed and didn't see any modules that would do what we were after, completely forgot about AppOps. Outstanding work and thanks so much for the help!
You're welcome!
boosting1bar said:
Awesome, worked here as well!! I'd looked through xposed and didn't see any modules that would do what we were after, completely forgot about AppOps. Outstanding work and thanks so much for the help!
Click to expand...
Click to collapse
How did you get this yo work? I am on a cm12 Rom also with the same issue.
Did all the above, but anytime I start the Bluetooth afterwards, it just reactivates the "Read / Write sms messages permission all over again nd im back to square 1.
Sorry to bump an old thread. But its still yhe same issue I am dealing with.
I have a dialog that I am trying to get when its closed. I am able to get the object of the dialog itself and add my own setOnDismissListener but that overwrites the default one causing problems.
What I'm doing now is re-copying the code from the original DialogInterface.OnDismissListener into my own OnDismissListener.
However, because I'm lazy, how, if possible, could I hook the existing OnDismissListener without hooking the DialogInterface class?
elesbb said:
I have a dialog that I am trying to get when its closed. I am able to get the object of the dialog itself and add my own setOnDismissListener but that overwrites the default one causing problems.
What I'm doing now is re-copying the code from the original DialogInterface.OnDismissListener into my own OnDismissListener.
However, because I'm lazy, how, if possible, could I hook the existing OnDismissListener without hooking the DialogInterface class?
Click to expand...
Click to collapse
Can't you hook the existing OnDismissListener? Or do you want to avoid that because it's in an anonymous class?
I think the closest to what you want to do is hook DialogInterface when that dialog is shown, and unhook it when it's hidden. You'll still need to check the package in your hook, but only when necessary.
GermainZ said:
Can't you hook the existing OnDismissListener? Or do you want to avoid that because it's in an anonymous class?
I think the closest to what you want to do is hook DialogInterface when that dialog is shown, and unhook it when it's hidden. You'll still need to check the package in your hook, but only when necessary.
Click to expand...
Click to collapse
Well, DIalogInterface.OnDismissListener is an interface which I believe xposed cannot hook.
I really think I am looking for something that doesn't exist because I am being lazy
What I think I can do though is hook the "Dialog" class then hook the "setOnDismissListener" and steal the parameter that was sent to it and store it as an object in my xposed class. Then register my own onDismissListener, and execute what I need, then call the original saved method.... I think. Lol.
elesbb said:
Well, DIalogInterface.OnDismissListener is an interface which I believe xposed cannot hook.
I really think I am looking for something that doesn't exist because I am being lazy
What I think I can do though is hook the "Dialog" class then hook the "setOnDismissListener" and steal the parameter that was sent to it and store it as an object in my xposed class. Then register my own onDismissListener, and execute what I need, then call the original saved method.... I think. Lol.
Click to expand...
Click to collapse
Well it'll be an anonymous class so you could try hooking that (e.g. ClassName$1.onDismissListener or ClassName$2.onDismissListener).
GermainZ said:
Well it'll be an anonymous class so you could try hooking that (e.g. ClassName$1.onDismissListener or ClassName$2.onDismissListener).
Click to expand...
Click to collapse
Ohhh I see what you mean. Yeah I could hook that, I thought you meant the general DialogInterface.OnDismissListener. Doh. I'm dumb
GermainZ said:
Well it'll be an anonymous class so you could try hooking that (e.g. ClassName$1.onDismissListener or ClassName$2.onDismissListener).
Click to expand...
Click to collapse
I remember now why this wouldn't work. The anonymous class is named differently in each device depending on OS version. (IE Sense, TouchWiz, AOSP)
So I think what I have now is to hooke each anonymous class then try to hook the "onDismiss" method and have a catch to catch any errors. Then if it catches an exception, go to the next anonymous class and try again then repeat until it hooks.
Inside the actual Google ChromeCast for Android, under the devices tab, you can see all of your ChromeCasts, their status, and a Play/Pause and Stop button for each one.
I've been trying to figure out how to trigger any of these Play/Pause or Stop actions through Tasker. Anyone figure it out? I can't seem to pickup an intent from LogCat or from a Secure Settings activity check. I know I can probably use AutoInput and simulate button presses....but that is a super sloppy way of doing this. I would think there should be some way to directly send these commands through Tasker.
Anyone figure something like this out? FYI AutoCast is not able to do this.....That app is junk when it comes to controlling Casts originating from other Apps.
Stupifier said:
Inside the actual Google ChromeCast for Android, under the devices tab, you can see all of your ChromeCasts, their status, and a Play/Pause and Stop button for each one.
I've been trying to figure out how to trigger any of these Play/Pause or Stop actions through Tasker. Anyone figure it out? I can't seem to pickup an intent from LogCat or from a Secure Settings activity check. I know I can probably use AutoInput and simulate button presses....but that is a super sloppy way of doing this. I would think there should be some way to directly send these commands through Tasker.
Anyone figure something like this out? FYI AutoCast is not able to do this.....That app is junk when it comes to controlling Casts originating from other Apps.
Click to expand...
Click to collapse
Xposed and autoshare intercept are your friends. Go go go!
loogielv said:
Xposed and autoshare intercept are your friends. Go go go!
Click to expand...
Click to collapse
I actually have both Xposed and Autoshare......could you give me a little more information? Which Xposed module? I'll be searching around int he meantime. Thanks though
A simple search for "ChromeCast" in xposed downloads doesn't really give much......is BubbleUPnP xposed module the one you are thinking of?
I have a profile that will turn off wifi and turn data on when I leave work.
I am trying to add a task to this that will open copilotand set the navigation to on of my saved destinations.
Can anyone help me with this please?
Never used copilot but i am pretty sure it is possible with autoinput.
You launch the app with tasker, and use a combination of autoinput commands, to have it open what you want.
The "intent" stuff that i know nothing about might be helpful as well.
Sent from my SM-G900F.
Thank, I hope someone could expand further with the items you mentioned please?
You could take a look at its intents on manifest file of the apk.
CrashOverride93 said:
You could take a look at its intents on manifest file of the apk.
Click to expand...
Click to collapse
Sorry haven't a clue what this means?
Tried using autonotification, it seems like it doesn't recognize what is clickable and what is not within your app and so i couldn't do anything with it. Havn't used it for a long time so i might be missing out on something. I probably am.
About intents check this out. Was just reading it since i don't know about intents either. It was interesting http://forum.xda-developers.com/showthread.php?t=2489449
Its an interesting read. Tried using an intent for google maps, your app recognized it. I could feed an address to the app but it will simply display it on the map.
There is most likely an intent for google maps to navigate to an address from your current position. If thats the case, your app most likely will recognize it as well which is what you are looking for.
Sent from my SM-G900F.