Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[APP]Headphone Shortcuts for SGS3 v0.5

OP rickythefox

7th July 2012, 02:26 AM   |  #1  
OP Senior Member
Flag Stockholm
Thanks Meter: 247
 
106 posts
Join Date:Joined: Jul 2012
More
Headphone Shortcuts for SGS3

REQUIRES STOCK-BASED ROM + ROOT + BUSYBOX!

This app allows you to choose which shortcut icons appear in the notification pulldown when earphones or headset is connected.

1. Unplug your headset.
2. Launch the app and tick the boxes for the apps you want to appear when you connect your headset.
3. Optionally sort selected apps using the "Sort" option on the menu.
4. Quit the app and connect the headset.







APK is attached. Also check out my Twelve Headphone Shortcuts MOD!

BusyBox: market link

If you like this app - press the Thanks button and rate the thread 5-stars!
If you like this app and have money to spare - donate a few $$$ to the WWF Tiger conservation project

I'm new to Android development, so leave feedback! Not working? I'll fix it!
Attached Files
File Type: apk HeadphoneShortcuts_v0.5.apk - [Click for QR Code] (86.7 KB, 6038 views)
Last edited by rickythefox; 15th July 2012 at 12:24 AM.
The Following 140 Users Say Thank You to rickythefox For This Useful Post: [ View ]
7th July 2012, 02:36 AM   |  #2  
OP Senior Member
Flag Stockholm
Thanks Meter: 247
 
106 posts
Join Date:Joined: Jul 2012
More
Version history

Planned for next version
* Include system apps in the list
* Possibly AOSP-based roms support? (think this will be another app)

v0.5 (11 Jul 2012)
* Maximum of 12 apps, see Twelve Headphone Shortcuts MOD
* Go read-only when headset is plugged in

v0.4 (9 Jul 2012)
* Allows reordering of apps
* Shows progress bar while loading apps

v0.3 (8 Jul 2012)
* More bugs fixed, confirmed working
* Notifies if root or busybox are not available

v0.2 (7 Jul 2012)
* Bugfix for crashes
* Checks and notifies if a headset is plugged in

v0.1 (6 Jul 2012)
* Initial release
Last edited by rickythefox; 15th July 2012 at 12:25 AM.
7th July 2012, 08:43 AM   |  #3  
zodiaxe66's Avatar
Senior Member
Thanks Meter: 450
 
1,525 posts
Join Date:Joined: Nov 2010
Sorry to say but it doesn't work as intended. Nothing appears in dropdown curtain and apps chosen are not saved.maybe add a "save" button in settings.
It's a nice feature,especially when curtain is available when lockscreen is on.
Last edited by zodiaxe66; 7th July 2012 at 08:47 AM.
The Following User Says Thank You to zodiaxe66 For This Useful Post: [ View ]
7th July 2012, 08:57 AM   |  #4  
qwerty12's Avatar
Senior Member
Flag (*England).London
Thanks Meter: 280
 
417 posts
Join Date:Joined: Jan 2005
More
Unfortunately clicking "ChatON" (as an example) doesn't seem to do anything and unchecking YouTube causes the app to crash:
Code:
D/[ Headphone Shortcuts ] (10454): App checked: Installed app
D/[ Headphone Shortcuts ] (10454): Name: YouTube
D/[ Headphone Shortcuts ] (10454):  Package: com.google.android.youtube
D/[ Headphone Shortcuts ] (10454):  Activities: Intent { act=android.intent.acti
on.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.google.and
roid.youtube cmp=com.google.android.youtube/.app.honeycomb.Shell$HomeActivity }
D/[ Headphone Shortcuts ] (10454): Database entry
D/[ Headphone Shortcuts ] (10454): app_id: 6
D/[ Headphone Shortcuts ] (10454):  pkg_name: com.google.android.youtube
D/[ Headphone Shortcuts ] (10454):  activity_name: com.google.android.youtube/.a
pp.honeycomb.Shell$HomeActivity
D/[ Headphone Shortcuts ] (10454):  exec_freq_with_headset: 0
I/SqliteDatabaseCpp(10454): sqlite returned: error code = 14, msg = cannot open
file at line 27502 of [ed759d5a9e], db=/data/data/com_sec_android_contextaware/d
atabases/logDatabase_db
I/SqliteDatabaseCpp(10454): sqlite returned: error code = 14, msg = os_unix.c: o
pen() at line 27502 - "" errno=13 path=/data/data/com.sec.android.contextaware/d
atabases, db=/data/data/com_sec_android_contextaware/databases/logDatabase_db
I/SqliteDatabaseCpp(10454): sqlite returned: error code = 14, msg = statement ab
orts at 17: [DELETE FROM appLogTable WHERE app_id = ?] , db=/data/data/com_sec_a
ndroid_contextaware/databases/logDatabase_db
I/SqliteDatabaseCpp(10454): sqlite returned: error code = 14, msg = cannot open
file at line 27502 of [ed759d5a9e], db=/data/data/com_sec_android_contextaware/d
atabases/logDatabase_db
I/SqliteDatabaseCpp(10454): sqlite returned: error code = 14, msg = os_unix.c: o
pen() at line 27502 - "" errno=13 path=/data/data/com.sec.android.contextaware/d
atabases, db=/data/data/com_sec_android_contextaware/databases/logDatabase_db
D/AndroidRuntime(10454): Shutting down VM
W/dalvikvm(10454): threadid=1: thread exiting with uncaught exception (group=0x4
0c6e1f8)
E/AndroidRuntime(10454): FATAL EXCEPTION: main
E/AndroidRuntime(10454): android.database.sqlite.SQLiteCantOpenDatabaseException
: unable to open database file
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteStatement.nativ
e_executeSql(Native Method)
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteStatement.execu
teUpdateDelete(SQLiteStatement.java:90)
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteDatabase.execut
eSql(SQLiteDatabase.java:2019)
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteDatabase.execSQ
L(SQLiteDatabase.java:1959)
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteDatabase.endTra
nsaction(SQLiteDatabase.java:736)
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteStatement.relea
seAndUnlock(SQLiteStatement.java:273)
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteStatement.execu
teUpdateDelete(SQLiteStatement.java:96)
E/AndroidRuntime(10454):        at android.database.sqlite.SQLiteDatabase.delete
(SQLiteDatabase.java:1861)
E/AndroidRuntime(10454):        at com.ginzburgconsulting.DbAppHandler.deleteApp
(DbAppHandler.java:158)
E/AndroidRuntime(10454):        at com.ginzburgconsulting.AppRepository.removeFr
omDatabase(AppRepository.java:39)
E/AndroidRuntime(10454):        at com.ginzburgconsulting.MainActivity.toggleApp
(MainActivity.java:94)
E/AndroidRuntime(10454):        at com.ginzburgconsulting.MainActivity.toggleApp
(MainActivity.java:86)
E/AndroidRuntime(10454):        at com.ginzburgconsulting.MainActivity$1.onItemC
lick(MainActivity.java:55)
E/AndroidRuntime(10454):        at android.widget.AdapterView.performItemClick(A
dapterView.java:292)
E/AndroidRuntime(10454):        at android.widget.AbsListView.performItemClick(A
bsListView.java:1359)
E/AndroidRuntime(10454):        at android.widget.AbsListView$PerformClick.run(A
bsListView.java:2988)
E/AndroidRuntime(10454):        at android.widget.AbsListView$1.run(AbsListView.
java:3783)
E/AndroidRuntime(10454):        at android.os.Handler.handleCallback(Handler.jav
a:605)
E/AndroidRuntime(10454):        at android.os.Handler.dispatchMessage(Handler.ja
va:92)
E/AndroidRuntime(10454):        at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(10454):        at android.app.ActivityThread.main(ActivityThrea
d.java:4517)
E/AndroidRuntime(10454):        at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(10454):        at java.lang.reflect.Method.invoke(Method.java:5
11)
E/AndroidRuntime(10454):        at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:993)
E/AndroidRuntime(10454):        at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:760)
E/AndroidRuntime(10454):        at de.robv.android.xposed.XposedBridge.main(Xpos
edBridge.java:93)
E/AndroidRuntime(10454):        at dalvik.system.NativeStart.main(Native Method)

W/ActivityManager( 7671):   Force finishing activity com.ginzburgconsulting/.Mai
nActivity
E/android.os.Debug( 7671): !@Dumpstate > dumpstate -k -t -n -z -d -o /data/log/d
umpstate_app_error
I/dumpstate(10557): begin
The Following User Says Thank You to qwerty12 For This Useful Post: [ View ]
7th July 2012, 10:09 AM   |  #5  
Senior Member
Thanks Meter: 938
 
2,431 posts
Join Date:Joined: Sep 2008
Quote:
Originally Posted by qwerty12

Unfortunately clicking "ChatON" (as an example) doesn't seem to do anything and unchecking YouTube causes the app to crash:

Same result here.
7th July 2012, 01:10 PM   |  #6  
OP Senior Member
Flag Stockholm
Thanks Meter: 247
 
106 posts
Join Date:Joined: Jul 2012
More
Quote:
Originally Posted by qwerty12

Unfortunately clicking "ChatON" (as an example) doesn't seem to do anything and unchecking YouTube causes the app to crash:

Thanks for the logcat! Some questions:
* Try restarting the phone. Is ChatON there now?
* When you run this app, are any of the apps in the list that appears checked?
* Can you please try running the app with the headphones unplugged and see if you get different results?
* If possible can you do:
Code:
adb shell ls -l /data/data/com.sec.android.contextaware/databases/
and post me the results?

Cheers!
Last edited by rickythefox; 7th July 2012 at 01:32 PM.
The Following User Says Thank You to rickythefox For This Useful Post: [ View ]
7th July 2012, 01:17 PM   |  #7  
OP Senior Member
Flag Stockholm
Thanks Meter: 247
 
106 posts
Join Date:Joined: Jul 2012
More
Quote:
Originally Posted by zodiaxe66

Sorry to say but it doesn't work as intended. Nothing appears in dropdown curtain and apps chosen are not saved.maybe add a "save" button in settings.
It's a nice feature,especially when curtain is available when lockscreen is on.

Can you please post logcat?
7th July 2012, 01:24 PM   |  #8  
qwerty12's Avatar
Senior Member
Flag (*England).London
Thanks Meter: 280
 
417 posts
Join Date:Joined: Jan 2005
More
(I would hit the Thanks button, but it seems I'm limited to 8 times a day :\)

Quote:
Originally Posted by rickythefox

Thanks for the logcat! Some questions:
* When you run this app, are any of the apps in the list that appears checked?

Yep, your app has marked all the apps that are shown by the status menu (FM Radio, Music Player, Video Player, Voice Recorder & YouTube)

Quote:

* Can you please try running the app with the headphones unplugged and see if you get different results?

Exactly the same - your app still shows the above as marked

Quote:

* If possible can you do:

Code:
adb shell ls /data/data/com.sec.android.contextaware/databases/
and post me the results?

Code:
logDatabase.db
logDatabase.db-journal
(This is on the XXBLFB firmware)

Thanks!
The Following User Says Thank You to qwerty12 For This Useful Post: [ View ]
7th July 2012, 01:40 PM   |  #9  
OP Senior Member
Flag Stockholm
Thanks Meter: 247
 
106 posts
Join Date:Joined: Jul 2012
More
Weird... Will have a look and get back to you!

Also you were too fast to answer, I was still editing the last post coz the command was not complete. Can you run this for me please:
Code:
adb shell ls -l /data/data/com.sec.android.contextaware/databases/
7th July 2012, 01:43 PM   |  #10  
qwerty12's Avatar
Senior Member
Flag (*England).London
Thanks Meter: 280
 
417 posts
Join Date:Joined: Jan 2005
More
Quote:
Originally Posted by rickythefox

Weird... Will have a look and get back to you!

Also you were too fast to answer, I was still editing the last post coz the command was not complete. Can you run this for me please:

Code:
adb shell ls -l /data/data/com.sec.android.contextaware/databases/

Heh, sorry

Code:
255|root@android:/ # ls -l /data/data/com.sec.android.contextaware/databases/
-rw-rw-rw- app_24   app_24      24576 2012-07-07 12:20 logDatabase.db
-rw-rw-rw- app_24   app_24          0 2012-07-06 19:53 logDatabase.db-journal

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes