[APP]Headphone Shortcuts for SGS3 v0.5

Search This thread

rickythefox

Senior Member
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.

av6kw3.png


2zel5ee.png


1ruh5v.png


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! :)
 

Attachments

  • HeadphoneShortcuts_v0.5.apk
    86.7 KB · Views: 8,572
Last edited:

rickythefox

Senior Member
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:

zodiaxe66

Senior Member
Nov 19, 2010
1,596
478
OnePlus 8T
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:
  • Like
Reactions: rickythefox

qwerty12

Senior Member
Jan 21, 2005
472
343
(*Europe).London
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
 
  • Like
Reactions: rickythefox

rickythefox

Senior Member
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:
  • Like
Reactions: qwerty12

qwerty12

Senior Member
Jan 21, 2005
472
343
(*Europe).London
(I would hit the Thanks button, but it seems I'm limited to 8 times a day :\)

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)

* 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

* 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!
 
  • Like
Reactions: rickythefox

rickythefox

Senior Member
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/
 

qwerty12

Senior Member
Jan 21, 2005
472
343
(*Europe).London
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
 

NexusCrazy

Senior Member
Feb 16, 2011
218
68
Blackpool
It crashes when I de-tick Game-Hub from the list of already ticked Apps. Just tried again it doesn't like anything being unticked that was already ticked by default.

Plus nothing is saved if you try adding to the list of default apps.

Hope this helps.

Good idea and I will be waiting with anticipation for an update.

Good work and good luck.

Sent from my GT-I9300 using XDA Premium App
 
Last edited:

zodiaxe66

Senior Member
Nov 19, 2010
1,596
478
OnePlus 8T
I reinstalled your app after flashing LFB.still same problem, ticked app does not stick and untick predefined apps make your app crash.sorry no log atm.when I get home I'll produce one.
 

rickythefox

Senior Member
Weird. May I ask you to execute a few commands and post the results?

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

Might have to flash a stock rom to fix this as it works for me...
 
Last edited:

MadBob

Senior Member
May 28, 2008
227
52
Xiaomi Mi Note 10
Xiaomi 12T Pro
Code:
drwxrwx--x app_22   app_22            2012-07-06 23:50 cache
drwxrwx--x app_22   app_22            2012-07-06 23:50 databases
drwxrwx--x app_22   app_22            2012-07-07 18:47 files
drwxr-xr-x system   system            2012-07-06 23:20 lib

Code:
-rw-rw-rw- app_22   app_22      24576 2012-07-07 18:47 logDatabase.db
-rw-rw-rw- app_22   app_22          0 2012-07-06 23:50 logDatabase.db-journal

That took me awhile to figure out as I have never needed ADB before :)

BTW this is a stock ROM rooted only.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 140
    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.

    av6kw3.png


    2zel5ee.png


    1ruh5v.png


    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! :)
    4
    Ok, I now know what the problem is. A definite fix is coming tomorrow.
    3
    v0.3 is out!

    Should fix the annoying permission bug. Please test and report here!
    2
    Same with the new JB release for ATT (United States). Installs fine, but nothing pops up in the notification bar.

    I should have come back to edit that post. Seems you need the file from the other thread the OP made (there is a link in the OP for it). It's a zip file that enable 12 icons in the pull down shade. Was really confusing in the OP, but I gave installing that a shot and I have it working fine! Will post a screenshot. BTW, I pushed only the .apk, I didn't flash it. There was too much strange stuff in that zip. Like I said, it's working fine.

    The Link: http://xdaforums.com/showthread.php?t=1763441
    2
    v0.4 released!
    * sorting of apps
    * progress bar when loading