# Change/Disable app when connecting to touchstone dock?



## SomeGuy23 (Oct 26, 2011)

Hey Guys,

I was wondering if there was a way to disable or change the app touchpad automatically goes to when placing the device in the touchstone docking station. I have looked in the settings but cant seem to find it. Currently mine goes directly to the clock app.

THANKS!


----------



## Dubi (Jan 19, 2012)

there is an app called dock-noop (https://play.google.com/store/apps/details?id=com.megagram.docknoop&hl=en ) which does what you want.
I think you can disable that internally in the settings db, but it doesn't stick after a reboot, so noop is the best option


----------



## KevlarGibs (Aug 22, 2011)

I've found a few apps taht do this sort of thing, but I'm trying to find one that will trigger a specific app to launch. I have a fullscreen weather app, and when on touchstone, it would be nice if that one would launch, instead of the builtin clock... any thoughts?


----------



## bboyairwreck (Jan 18, 2012)

this answer may or may not be repetitive but I have Desk Clock Plus. It has a bunch of features when you connect the dock such as displaying fullscreen weather, launching a certain music application, displaying a slideshow (with the folder of your choice), intializing alarm clock settings, or just a full screen clock.

I use it for weather. While i know you may want to use your own weather app, for me in the seattle area, it displays weather just fine. Hope this somewhat helps. lemme know


----------



## noseph (Feb 19, 2012)

I have managed to select the wrong option on a popup and now whenever I set my TouchPad on the Touchstone Poweramp begins to play. I have searched thru all of the setting I can find, however I cannot seem to find any setting that controls this behavior. Any ideas?


----------



## Dubi (Jan 19, 2012)

KevlarGibs said:


> I've found a few apps taht do this sort of thing, but I'm trying to find one that will trigger a specific app to launch. I have a fullscreen weather app, and when on touchstone, it would be nice if that one would launch, instead of the builtin clock... any thoughts?


I wrote this simple app to do just that









http://www.zen24223.....uk/dockapp.zip

There are two apks in the zip.

dockapp.apk is the application that is executed every time you dock the TouchPad









If you can't see that dialog, it means another app has already set as default for the DESK_DOCK intent, so you need to findout which one and clean its settings.

After choosing "dockapp" as the default for dock, run the second app "dockappconfig" which allows you to specify which app you want to run.









Let me know if it helps.









(Choosing the launcher as the application to launch is like having the dock-noop installed)


----------



## noseph (Feb 19, 2012)

Dubi,

I must be thick in the head but I can not find *Home Settings > Applications > Manage applications* in order to clear my default.


----------



## Dubi (Jan 19, 2012)

8)

That's the default message, I guess that came from old 2.3 8)

To clean that, go to Settings->Apps->ALL
and browse until you find the application that is started everytime you dock the TP.
After clicking in the app, you should go to a page where you can Force Stop, Uninstall, Clea data, and so on.
At the bottom should be a "Clear defaults" which removes the "use by default for this action" check box.


----------



## noseph (Feb 19, 2012)

Thanks for the advice, however the app that gets run when I place the TouchPad on the Touchstone is Poweramp and it's settings do notshow it as being set as default. I guess I need to post on their forums for a solution.


----------



## KevlarGibs (Aug 22, 2011)

Holy crap, you are awesome. Thanks for taking care of all of these silly little requests for us.

Sent from my cm_tenderloin using RootzWiki


----------



## Dubi (Jan 19, 2012)

noseph said:


> Thanks for the advice, however the app that gets run when I place the TouchPad on the Touchstone is Poweramp and it's settings do notshow it as being set as default. I guess I need to post on their forums for a solution.


what if you uninstall poweramp, if is not in the list, use the hard way deleting the app from /data/app or /system/app?
I will try to find out where it keeps the default action list, there must be a database somewhere with those settings.


----------



## Dubi (Jan 19, 2012)

KevlarGibs said:


> Holy crap, you are awesome. Thanks for taking care of all of these silly little requests for us.
> 
> Sent from my cm_tenderloin using RootzWiki












It's was really good idea. (not a silly request







)
Not sure why is not selectable by default, I now the app has to be "special" (be able to handle the DESK_DOCK intent) but it's as easy as doing a launcher like the "dockapp".

I may do another version, I forgot to remove the dockapp from the list of applications to choose, which could have problems, I guess if I select that one, it will get into an infinity loop and crash


----------



## Dubi (Jan 19, 2012)

noseph said:


> Thanks for the advice, however the app that gets run when I place the TouchPad on the Touchstone is Poweramp and it's settings do notshow it as being set as default. I guess I need to post on their forums for a solution.


After some digging in the source, it appears the place where Android stores the list of default applications in the "packages.xml" in "/data/system"

You can see something like this for the DESK_DOCK intent (which is the event that gets raised when you put the TP in the dock)


```
<br />
/data/system/packages.xml<br />
...<br />
...<br />
<item name="com.dubi.dockapp/.dockapp" match="100000" set="3"><br />
<set name="com.android.deskclock/.DeskClock" /><br />
<set name="com.megagram.docknoop/.DockHandler" /><br />
<set name="com.dubi.dockapp/.dockapp" /><br />
<filter><br />
<action name="android.intent.action.MAIN" /><br />
<cat name="android.intent.category.DESK_DOCK" /><br />
<cat name="android.intent.category.DEFAULT" /><br />
</filter><br />
</item><br />
...<br />
...<br />
```
The first item is the default application:

```
<br />
<item name="com.dubi.dockapp/.dockapp" match="100000" set="3"><br />
```
To be able to get the launch dialog back (without doing a 'ClearDefaults' from settings for a particular app) delete the whole block for that intent.
(The block above, from '<item...' to '</item>') from the 'packages.xml' file and reboot.
That should clear any default application for that intent.


----------



## noseph (Feb 19, 2012)

Thanks Dubi. I was able to resolve my issue by clearing the Poweramp cache and data.


----------



## noseph (Feb 19, 2012)

Update for anyone else having the issue with Poweramp playing when you place the TouchPad on your Touchstone. The issue was completely resolved in Poweramp settings by un-checking *Resume On Headset Connect* under the Headset section.


----------



## Mgamerz (Feb 15, 2012)

Is there anyway to change/turn on/off the docking sound? I had mine on in CM7 but the settings are gone in CM9, and the audio changed as of like 3 nightlys ago so somebody is dinkin with it...


----------



## heavyt (Mar 26, 2012)

Dubi said:


> I wrote this simple app to do just that
> 
> 
> 
> ...


For some reason it fails to install. I am using CM9 build date 17 (also tried it on build 15). The log did not seem to show any error.


```
<br />
-- Installing: /sdcard/Download/dockapp-1.zip<br />
Finding update package...<br />
[URL=I:Update]I:Update[/URL] location: /sdcard/Download/dockapp-1.zip<br />
Opening update package...<br />
Installing update...<br />
Installation aborted.<br />
result was NULL, message is: assert failed: install_zip("/sdcard/Download/dockapp-1.zip")<br />
```


----------



## Dubi (Jan 19, 2012)

Umm, are you trying to install the zip from recovery?
Try unzip it and install the two APK from some file explorer.


----------



## heavyt (Mar 26, 2012)

Dubi said:


> Umm, are you trying to install the zip from recovery?
> Try unzip it and install the two APK from some file explorer.


Yes I tried the unzip way and used the file explorer also an app installer but it fail to install.


----------



## Dubi (Jan 19, 2012)

ummm, do you have the "allow unknown sources" in the Security settings?
It's quite strange that a simple app fails to install. (and this one is really simple







)


----------

