5,597,501 Members 31,341 Now Online
XDA Developers Android and Mobile Development Forum

[APP]Headphone Shortcuts for SGS3 v0.5

Tip us?
 
rickythefox
Old
(Last edited by rickythefox; 14th July 2012 at 11:24 PM.)
#1  
Member - OP
Thanks Meter 194
Posts: 49
Join Date: Jul 2012
Location: Stockholm
Audio [APP]Headphone Shortcuts for SGS3 v0.5

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, 5647 views)
Twitter: @rickythefox
The Following 140 Users Say Thank You to rickythefox For This Useful Post: [ Click to Expand ]
 
rickythefox
Old
(Last edited by rickythefox; 14th July 2012 at 11:25 PM.)
#2  
Member - OP
Thanks Meter 194
Posts: 49
Join Date: Jul 2012
Location: Stockholm
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
Twitter: @rickythefox
 
zodiaxe66
Old
(Last edited by zodiaxe66; 7th July 2012 at 07:47 AM.)
#3  
zodiaxe66's Avatar
Senior Member
Thanks Meter 436
Posts: 1,475
Join Date: 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.
Galaxy SIII
Rom: echoe-rom v2 "stripped and modified"
base:4.3
powered by
*~* devil2 *~*
Back to googymax2.. 218 is awesome
The Following User Says Thank You to zodiaxe66 For This Useful Post: [ Click to Expand ]
 
qwerty12
Old
#4  
qwerty12's Avatar
Senior Member
Thanks Meter 274
Posts: 416
Join Date: Jan 2005
Location: (*England).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
iPad 4 (jailbroken)
New NFCLockScreenEnabler with fixes and big improvements by madfish and Mohammad: http://forum.xda-developers.com/show...04&postcount=1
The Following User Says Thank You to qwerty12 For This Useful Post: [ Click to Expand ]
 
NZtechfreak
Old
#5  
Senior Member
Thanks Meter 907
Posts: 2,342
Join Date: Sep 2008
Quote:
Originally Posted by qwerty12 View Post
Unfortunately clicking "ChatON" (as an example) doesn't seem to do anything and unchecking YouTube causes the app to crash:
Same result here.
Twitter: @nztechfreak
Blogs: androidnz.net, blog.clove.co.uk
Facebook: http://goo.gl/baZHQ


 
rickythefox
Old
(Last edited by rickythefox; 7th July 2012 at 12:32 PM.)
#6  
Member - OP
Thanks Meter 194
Posts: 49
Join Date: Jul 2012
Location: Stockholm
Quote:
Originally Posted by qwerty12 View Post
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!
The Following User Says Thank You to rickythefox For This Useful Post: [ Click to Expand ]
 
rickythefox
Old
#7  
Member - OP
Thanks Meter 194
Posts: 49
Join Date: Jul 2012
Location: Stockholm
Quote:
Originally Posted by zodiaxe66 View Post
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?
 
qwerty12
Old
#8  
qwerty12's Avatar
Senior Member
Thanks Meter 274
Posts: 416
Join Date: Jan 2005
Location: (*England).London
(I would hit the Thanks button, but it seems I'm limited to 8 times a day :\)

Quote:
Originally Posted by rickythefox View Post
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!
iPad 4 (jailbroken)
New NFCLockScreenEnabler with fixes and big improvements by madfish and Mohammad: http://forum.xda-developers.com/show...04&postcount=1
The Following User Says Thank You to qwerty12 For This Useful Post: [ Click to Expand ]
 
rickythefox
Old
#9  
Member - OP
Thanks Meter 194
Posts: 49
Join Date: Jul 2012
Location: Stockholm
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
Old
#10  
qwerty12's Avatar
Senior Member
Thanks Meter 274
Posts: 416
Join Date: Jan 2005
Location: (*England).London
Quote:
Originally Posted by rickythefox View Post
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
iPad 4 (jailbroken)
New NFCLockScreenEnabler with fixes and big improvements by madfish and Mohammad: http://forum.xda-developers.com/show...04&postcount=1

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes