[App] AppWidgetPicker

Search This thread

boombuler

Senior Member
Jul 16, 2008
161
224
Hi there,

I published it a few weeks ago via twitter but I think I should post it here to:

I have written an App to replace the stock AppWidgetPicker. (you know long press on the homescreen -> add -> widget) which groups the widgets by packages.

So if you have a widget installed that has 3 different sizes, there is only one entry in the list and if you click it you can pick the size in a second dialog.

The main problem is that it needs to be installed on /system cause android will not grand the needed permission to any app installed on /data.

The APK is attached

The source can be found here

Its all released under Apache 2.0 license.

Hope you like it.

Instructions:
* Download the attached APK file
* Rename it to "AppWidgetPicker.apk"
* copy it to /system/app
* make sure it has the same file permissions as the other files in that directory
* maybe reboot.
* Don't install it just copy it!

Other Information:
* Doesn't work with HTC-Sense but should work with all "Stock-Based" Launchers like Launcher PRO, ADW, Zeam etc. pp.


Screenshot Version 1.2.3:
a5paJ.png


Screenshot Version 2.0:
DnBkg.png



Have fun.
Boombuler

EDIT:
The attached version should work with eclair, froyo and gingerbread!

Changelog:

Version 2.0
* HC Style widget picking

Version 1.2.3
* fixed dutch translation
* added portuguese translation (Thx to PinhoPT)

Version 1.2.2
* added dutch translation (Thx to Hallahan)
* added norwegian translation (Thx to Royan)
* added russian translation (Thx to creage)

Version 1.2.1
* added italian translation (Thx to etoy)
* added france translation (Thx to EViollet)

Version 1.2.0
* Fixed sorting of the subitems
* now displays the number of subitems

Version 1.1.1
* Fixed sorting (Thx to Se7enLC)

Version 1.1.0
* Fixed layouts (should look more android like)
* Fixed black background while scrolling (with CM)

Version 1.0.1
* Fixed FC

everytime someone don't follow the instructions and get a FC afterwards a kitten dies!
Version 2 only works with android 3.1 or above!
 

Attachments

  • AppWidgetPicker-1.2.3.apk
    16.4 KB · Views: 49,646
  • AppWidgetPicker2.apk
    22.8 KB · Views: 21,762
Last edited:
D

Deleted member 267841

Guest
hi,
I needed to remove anything in / system in order yo use your application?
e.g. the original appwidgetpicker?
agree
 

boombuler

Senior Member
Jul 16, 2008
161
224
no.
I've set the priority of my app higher then the original one...
simply copy the apk to /system/app that should be all ;)
 
Last edited:

ZeroBarrier

Senior Member
Apr 28, 2010
111
33
Las Vegas
This is actually very nice.

A few questions though, I noticed it's not using the same window as the stock one, any chance you can make it use the stock window graphics? I ask because I theme my ROM and the window doesn't match the regular one 100%.

Also, the sorting of the widgets is different as well. For instance, the stock sorting puts my 3 "cubed" player on top of the list while with yours it's at the bottom of the list. Can it be made to sort the widgets like the stock one?

Other than those two things, it's actually perfect. I love this.
 

boombuler

Senior Member
Jul 16, 2008
161
224
Hi,

I was trying to make this on look like the stock once but I failed... If someone with some more Android GUI knowlede might have a look it would be nice...

Sorting is different? Shouldn't be but I have a look!

For the eclair version: If I have someone to test this stuff I'll try to ;)

-- boombuler

Edit:
Uploaded eclair version in first post... please test this
 
Last edited:

xFlawless11x

Senior Member
Jun 23, 2010
143
4
Getting force close on anything that doesn't have more then one option.

Droid Incredible
FrankenROM

But I love the concept, keep up the good work.

-Flawless
 

Beackman

Senior Member
Oct 6, 2009
1,059
221
38
São Paulo
I'm have FC too, here the log when try to add the widget.

PS: the widget are in system/app folder too.
 
Last edited:

boombuler

Senior Member
Jul 16, 2008
161
224
I'm have FC too, here the log when try to add the widget.

PS: the widget are in system/app folder too.

Info from your LogCat:
User 10093 does not have android.permission.BIND_APPWIDGET.

Have you installed the App to /system/app ??
Cause android didn't grant you the needed permission!

eclair or froyo?


Regards
Florian


Edit:
After inspecting the whole log:
You have installed the APK (which causes it to be installed to /data/app)
just copy it to /system/app instead of installing it... That should do the trick (uninstall it first ;))
 
Last edited:

Beackman

Senior Member
Oct 6, 2009
1,059
221
38
São Paulo
Yea man, it works, sorry for that man, i just copy the apk for /system/app restart the phone and its works, i use Eclair version.

thx man, cheers.
 

rori~

Senior Member
Aug 21, 2009
4,209
820
Vienna
..moved to /system/app...still fc.

Code:
D/dalvikvm(  260): GC_EXPLICIT freed 2581 objects / 124088 bytes in 65ms
I/ActivityManager(  133): Starting activity: Intent { act=android.appwidget.action.APPWIDGET_PICK cmp=com.boombuler.system.appwidgetpicker/.AppWidgetPickerActivity (has extras) }
I/ActivityManager(  133): Start proc com.boombuler.system.appwidgetpicker for activity com.boombuler.system.appwidgetpicker/.AppWidgetPickerActivity: pid=1149 uid=10133 gids={}
W/InputManagerService(  133): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4600c0b0
W/asset   ( 1149): Asset path /system/app/com.boombuler.system.appwidgetpicker-1.apk is neither a directory nor file (type=1).
D/AndroidRuntime( 1149): Shutting down VM
W/dalvikvm( 1149): threadid=1: thread exiting with uncaught exception (group=0x4001d7e8)
E/AndroidRuntime( 1149): FATAL EXCEPTION: main
E/AndroidRuntime( 1149): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.boombuler.system.appwidgetpicker/com.boombuler.system.appwidgetpicker.AppWidgetPickerActivity}: java.lang.ClassNotFoundException: com.boombuler.syst
em.appwidgetpicker.AppWidgetPickerActivity in loader dalvik.system.PathClassLoader[/system/app/com.boombuler.system.appwidgetpicker-1.apk]
E/AndroidRuntime( 1149):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
E/AndroidRuntime( 1149):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 1149):        at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 1149):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 1149):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1149):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1149):        at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 1149):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1149):        at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1149):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 1149):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 1149):        at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1149): Caused by: java.lang.ClassNotFoundException: com.boombuler.system.appwidgetpicker.AppWidgetPickerActivity in loader dalvik.system.PathClassLoader[/system/app/com.boombuler.system.appwidgetpicker-1.apk]
E/AndroidRuntime( 1149):        at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
E/AndroidRuntime( 1149):        at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/AndroidRuntime( 1149):        at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/AndroidRuntime( 1149):        at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime( 1149):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime( 1149):        ... 11 more
W/ActivityManager(  133):   Force finishing activity com.boombuler.system.appwidgetpicker/.AppWidgetPickerActivity
W/InputManagerService(  133): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@465ea190
W/ActivityManager(  133): Activity pause timeout for HistoryRecord{465d7728 com.boombuler.system.appwidgetpicker/.AppWidgetPickerActivity}
D/dalvikvm(  133): GC_FOR_MALLOC freed 33698 objects / 1969056 bytes in 140ms
I/Process ( 1149): Sending signal. PID: 1149 SIG: 9
W/InputManagerService(  133): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@46495fd0
I/ActivityManager(  133): Process com.boombuler.system.appwidgetpicker (pid 1149) has died.
exD/dalvikvm(  570): GC_EXPLICIT freed 596 objects / 38120 bytes in 54ms
W/ActivityManager(  133): Activity destroy timeout for HistoryRecord{465d7728 com.boombuler.system.appwidgetpicker/.AppWidgetPickerActivity}
 

NexuSix

Senior Member
Sep 2, 2010
97
4
Corvallis, Oregon
This is actually very nice.

A few questions though, I noticed it's not using the same window as the stock one, any chance you can make it use the stock window graphics? I ask because I theme my ROM and the window doesn't match the regular one 100%.

Also, the sorting of the widgets is different as well. For instance, the stock sorting puts my 3 "cubed" player on top of the list while with yours it's at the bottom of the list. Can it be made to sort the widgets like the stock one?

Other than those two things, it's actually perfect. I love this.

Works very nice on the N1, everything works smoothly without event. I actually like this very much, I also would like to see improvements on the GUI...I also got resorting, see attached screenshots:

attachment.php


Sent from my Nexus One using XDA App
 

Attachments

  • ImageUploadByTapatalk.jpg
    ImageUploadByTapatalk.jpg
    13.7 KB · Views: 2,478
  • CAP201009140114.jpg
    CAP201009140114.jpg
    31.8 KB · Views: 10,720
Last edited:

boombuler

Senior Member
Jul 16, 2008
161
224
Hi,

have you uninstalled the old version first?

Looks kind of weird that he searches for the file:
/system/app/com.boombuler.system.appwidgetpicker-1.apk

please try this:
1) delete apk from /system/app
2) uninstall from system (if still present)
3) remove any "com.boombuler.system*" file from /data/dalvik-cache
4) look if it uses the old dialog
5) if 4 was positive copy the apk to /system/app without installing anything

Regards
Florian
 

NexuSix

Senior Member
Sep 2, 2010
97
4
Corvallis, Oregon
Works very nice on the N1, everything works smoothly without event. I actually like this very much, I also would like to see improvements on the GUI...I also got resorting, see attached screenshots:

attachment.php


Sent from my Nexus One using XDA App

Actually I posted too soon everytime I try to place a widget on the home screen using AppWidgetPicker I get a FC.

Sent from my Nexus One using XDA App
 

Attachments

  • ImageUploadByTapatalk.jpg
    ImageUploadByTapatalk.jpg
    13.9 KB · Views: 2,288

Top Liked Posts

  • There are no posts matching your filters.
  • 186
    Hi there,

    I published it a few weeks ago via twitter but I think I should post it here to:

    I have written an App to replace the stock AppWidgetPicker. (you know long press on the homescreen -> add -> widget) which groups the widgets by packages.

    So if you have a widget installed that has 3 different sizes, there is only one entry in the list and if you click it you can pick the size in a second dialog.

    The main problem is that it needs to be installed on /system cause android will not grand the needed permission to any app installed on /data.

    The APK is attached

    The source can be found here

    Its all released under Apache 2.0 license.

    Hope you like it.

    Instructions:
    * Download the attached APK file
    * Rename it to "AppWidgetPicker.apk"
    * copy it to /system/app
    * make sure it has the same file permissions as the other files in that directory
    * maybe reboot.
    * Don't install it just copy it!

    Other Information:
    * Doesn't work with HTC-Sense but should work with all "Stock-Based" Launchers like Launcher PRO, ADW, Zeam etc. pp.


    Screenshot Version 1.2.3:
    a5paJ.png


    Screenshot Version 2.0:
    DnBkg.png



    Have fun.
    Boombuler

    EDIT:
    The attached version should work with eclair, froyo and gingerbread!

    Changelog:

    Version 2.0
    * HC Style widget picking

    Version 1.2.3
    * fixed dutch translation
    * added portuguese translation (Thx to PinhoPT)

    Version 1.2.2
    * added dutch translation (Thx to Hallahan)
    * added norwegian translation (Thx to Royan)
    * added russian translation (Thx to creage)

    Version 1.2.1
    * added italian translation (Thx to etoy)
    * added france translation (Thx to EViollet)

    Version 1.2.0
    * Fixed sorting of the subitems
    * now displays the number of subitems

    Version 1.1.1
    * Fixed sorting (Thx to Se7enLC)

    Version 1.1.0
    * Fixed layouts (should look more android like)
    * Fixed black background while scrolling (with CM)

    Version 1.0.1
    * Fixed FC

    everytime someone don't follow the instructions and get a FC afterwards a kitten dies!
    Version 2 only works with android 3.1 or above!
    3
    Launchers have nothing to do with it, so there's no need for a list. It's a system app.

    Thats not 100% correct... It works with every launcher that uses the android api to pick the widget... The sense launcher for example has its own picking code...
    2
    Alternative Installation using TB Pro

    Thank you, thank you, thank you for this app!

    Since one needs to have root anyway one probably has TitaniumBackup available. There you have the option to convert an app to a system app (probably in TB Pro only).

    So if you have TB Pro: just install the apk, run TB, find the AppWiegetPicker and use the context menu to make it into a system app - Done and working!
    2
    Alrighty...I'm learning here so bear with me!!

    I not understand why the REQUIREMENT to copy the app to /system/app, however, when I attempt to do so, I have a permission issue...not able to write/modify the contents of that /system/app folder. Can someone tell me how to do so? I didn't see an option to change permissions in Astro or the Free Advanced File Manager app I am using to browse my card and the root folders.

    THANKS AGAIN!!

    Hi,

    let me explain a few things:
    1st) renaming is an optional step but it helps with updates...
    2nd) the requirement of copying this file to /system/app instead of "installing" it is simple. The Permission which is needed to "bind" widgets is only granted to apps which are "system-apps" which means they are either signed with the system builder key (which can differ from rom to rom) or are installed on /system/app
    3rd) you need to remount the /system partion first (otherwise you can not modify files on /system) this can be done with the commandline "adb remount" if you have the SDK installed. If not ask the other guys around here how to use those gui tools or apps for it cause I don't know which one is capable of remounting the system partion and how to do it ;-)

    Hope this helps you with your questions.