App to show clock while charging?

Discussion in 'Samsung Galaxy Nexus' started by TheCleaner, Jan 2, 2012.

  1. captdroid

    captdroid Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    1,797
    Likes Received:
    17
    Trophy Points:
    68
    Ratings:
    +17
    'Plug in Launcher' in the market seems to work. You can assign an app to either USB or Power and other options. Also has disable button.

    I assigned the clock app to the power option in Plug in Launcher and it worked fine launching the 'deskclock' after plugging in the power.
     
    #13 captdroid, Jan 2, 2012
    Last edited: Jan 2, 2012
  2. gflam

    gflam Developer
    Theme Developer Developer

    Joined:
    Jun 14, 2010
    Messages:
    1,900
    Likes Received:
    29
    Trophy Points:
    113
    Location:
    Jersey
    Ratings:
    +34
    Whats the package on your deskclock? com.android.deskclock? just a guess :) i have an htc device and my d1 isn't with me so i can't check it really
     
  3. captdroid

    captdroid Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    1,797
    Likes Received:
    17
    Trophy Points:
    68
    Ratings:
    +17
    com.google.android.deskclock on stock 4.02 ICS
     
  4. gflam

    gflam Developer
    Theme Developer Developer

    Joined:
    Jun 14, 2010
    Messages:
    1,900
    Likes Received:
    29
    Trophy Points:
    113
    Location:
    Jersey
    Ratings:
    +34
    Alright well using that package name my intent looks like this

    Code:
    Intent i = new Intent(Intent.ACTION_MAIN);
    i.setComponent(new ComponentName("com.google.android.desklock", ".DeskClock"));
    i.addCategory(Intent.CATEGORY_LAUNCHER);
    context.startActivity(i);
    Assuming DeskClock is the correct activity

    All that i have left is to write in to enable and disable it and then i'll post the apk i don't have ics on my phone right now so it force closes for me since that package doesn't exist in sense :) ha but guess you'll let me know
     
  5. captdroid

    captdroid Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    1,797
    Likes Received:
    17
    Trophy Points:
    68
    Ratings:
    +17
    Cool I'll test it out for you. If it works could you make one for me to launch package name 'spinninghead.carhome' and the enable / disable? Just asking don't mean to hijack the thread. But your simplified app may work better then my other solution posted.
     
  6. TeeX

    TeeX Member

    Joined:
    Feb 7, 2011
    Messages:
    244
    Likes Received:
    4
    Trophy Points:
    18
    Ratings:
    +4
    oooh second this! I'd love an automated launcher for car home! that app is the bomb!

    I'd like to donate some cashey money for your efforts. PayPal maybe??



    Sent from my Galaxy Nexus using DroidForums
     
  7. gflam

    gflam Developer
    Theme Developer Developer

    Joined:
    Jun 14, 2010
    Messages:
    1,900
    Likes Received:
    29
    Trophy Points:
    113
    Location:
    Jersey
    Ratings:
    +34
    Yea sure just gonna need the activity name i'll show you how to get that in a second but here try this out let me know if that launches your deskclock i guessed on the activity if it doesn't work that's what the issue will be :)

    View attachment 45256

    Just unzip the above file and use the apk inside

    Let me know how it works would be easier if i had a gnex :) lol
     
  8. captdroid

    captdroid Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    1,797
    Likes Received:
    17
    Trophy Points:
    68
    Ratings:
    +17
    No work. :) Here is what a logcat shows when I launch the deskclock though:

    I/ActivityManager(30121): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.google.android.deskclock/com.android.deskclock.DeskClock bnds=[40,255][200,455]} from pid 30880
    I/ActivityManager(30121): Start proc com.google.android.deskclock for activity com.google.android.deskclock/com.android.deskclock.DeskClock: pid=32493 uid=10013 gids={}
    I/ActivityThread(32493): Pub com.android.deskclock: com.android.deskclock.AlarmProvider
     
  9. TheCleaner

    TheCleaner Member

    Joined:
    Dec 3, 2009
    Messages:
    169
    Likes Received:
    4
    Trophy Points:
    18
    Ratings:
    +4
    Installed and plugged in my charger...said "unfortunately ChargeDock had to close" with an OK button

    Sent from my Galaxy Nexus using DroidForums
     
  10. gflam

    gflam Developer
    Theme Developer Developer

    Joined:
    Jun 14, 2010
    Messages:
    1,900
    Likes Received:
    29
    Trophy Points:
    113
    Location:
    Jersey
    Ratings:
    +34
    K thanks that's helpful i'll change the intent up now
     
  11. gflam

    gflam Developer
    Theme Developer Developer

    Joined:
    Jun 14, 2010
    Messages:
    1,900
    Likes Received:
    29
    Trophy Points:
    113
    Location:
    Jersey
    Ratings:
    +34
    Alright this ones different didn't feel like zipping this one ha just rename the end to apk so should be ChargeClock.apk
     
  12. captdroid

    captdroid Senior Member

    Joined:
    Jun 30, 2010
    Messages:
    1,797
    Likes Received:
    17
    Trophy Points:
    68
    Ratings:
    +17
    Nope... 'Unfortunately , ChargeClock has stopped' logcat:

    W/PowerUI (30189): unknown intent: Intent { act=android.intent.action.ACTION_POWER_CONNECTED flg=0x10000010 }
    I/com.keramidas.MediaSync.sync.v(28968): onServiceConnected()
    I/com.keramidas.MediaSync.sync.SyncService(28968): resumeOperation()
    I/com.keramidas.MediaSync.sync.SyncService(28968): Worker thread woke up !
    I/com.keramidas.MediaSync.sync.SyncService(28968): Worker thread going to sleep (idle) ...
    I/com.keramidas.MediaSync.sync.a.e(28968): Charger is connected (AC).
    D/UploadsManager(20071): collect new photos: photoTracker:*******************,trackNew:external,1408:internal,0
    I/com.keramidas.MediaSync.sync.v(28968): Power ok = true, Connection ok = true Local storage ok = true
    D/dalvikvm(20071): GC_CONCURRENT freed 455K, 5% free 14942K/15623K, paused 2ms+2ms
    D/dalvikvm(32384): GC_CONCURRENT freed 424K, 5% free 14389K/15047K, paused 1ms+1ms
    D/dalvikvm(32384): GC_CONCURRENT freed 407K, 5% free 14376K/15047K, paused 1ms+2ms
    D/dalvikvm(30622): GC_CONCURRENT freed 418K, 5% free 14446K/15175K, paused 2ms+1ms
    D/dalvikvm(30622): GC_FOR_ALLOC freed 184K, 5% free 14446K/15175K, paused 16ms
    D/dalvikvm(30622): GC_FOR_ALLOC freed 147K, 5% free 14444K/15175K, paused 15ms
    E/NotificationService(30121): Ignoring notification with icon==0: Notification(contentView=null vibrate=null,sound=null,defaults=0x0,flags=0x1)
    E/NotificationService(30121): Ignoring notification with icon==0: Notification(contentView=null vibrate=null,sound=null,defaults=0x0,flags=0x1)
    I/ActivityManager(30121): Start proc com.launcher.plugin for broadcast com.launcher.plugin/.receiver.PowerReceiver: pid=1082 uid=10119 gids={3003}
    I/dalvikvm( 1082): Turning on JNI app bug workarounds for target SDK version 7...
    D/AndroidRuntime( 955): Shutting down VM
    W/dalvikvm( 955): threadid=1: thread exiting with uncaught exception (group=0x40a4e1f8)
    I/ActivityManager(30121): No longer want com.android.vending (pid 32281): hidden #16
    D/UploadsManager(20071): storage not available: internal
    D/UploadsManager(20071): new media: null
    E/AndroidRuntime( 955): FATAL EXCEPTION: main
    E/AndroidRuntime( 955): java.lang.RuntimeException: Unable to start receiver com.init2winitapps.chargeclock.Charging: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
    E/AndroidRuntime( 955): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2125)
    E/AndroidRuntime( 955): at android.app.ActivityThread.access$1500(ActivityThread.java:122)
    E/AndroidRuntime( 955): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    E/AndroidRuntime( 955): at android.os.Handler.dispatchMessage(Handler.java:99)
    E/AndroidRuntime( 955): at android.os.Looper.loop(Looper.java:137)
    E/AndroidRuntime( 955): at android.app.ActivityThread.main(ActivityThread.java:4340)
    E/AndroidRuntime( 955): at java.lang.reflect.Method.invokeNative(Native Method)
    E/AndroidRuntime( 955): at java.lang.reflect.Method.invoke(Method.java:511)
    E/AndroidRuntime( 955): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    E/AndroidRuntime( 955): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    E/AndroidRuntime( 955): at dalvik.system.NativeStart.main(Native Method)
    E/AndroidRuntime( 955): Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
    E/AndroidRuntime( 955): at android.app.ContextImpl.startActivity(ContextImpl.java:847)
    E/AndroidRuntime( 955): at android.content.ContextWrapper.startActivity(ContextWrapper.java:276)
    E/AndroidRuntime( 955): at android.content.ContextWrapper.startActivity(ContextWrapper.java:276)
    E/AndroidRuntime( 955): at com.init2winitapps.chargeclock.Charging.onReceive(Charging.java:20)
    E/AndroidRuntime( 955): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2118)
    E/AndroidRuntime( 955): ... 10 more
    I/WindowManager(30121): createSurface Window{422b6b68 paused=false}: DRAW NOW PENDING
    D/dalvikvm(30622): GC_CONCURRENT freed 522K, 5% free 14434K/15175K, paused 2ms+4ms
    D/dalvikvm(30622): GC_CONCURRENT freed 512K, 5% free 14434K/15175K, paused 2ms+2ms
    D/dalvikvm(30622): GC_CONCURRENT freed 446K, 5% free 14458K/15175K, paused 2ms+4ms
    E/NotificationService(30121): Ignoring notification with icon==0: Notification(contentView=null vibrate=null,sound=null,defaults=0x0,flags=0x1)
    W/ActivityManager(30121): Activity destroy timeout for ActivityRecord{41cfdcc8 com.android.packageinstaller/.InstallAppProgress}
    D/dalvikvm(30622): GC_CONCURRENT freed 509K, 5% free 14461K/15175K, paused 2ms+2ms
    D/dalvikvm(30622): GC_CONCURRENT freed 513K, 5% free 14459K/15175K, paused 3ms+11ms
    D/dalvikvm(30622): GC_CONCURRENT freed 511K, 5% free 14459K/15175K, paused 2ms+4ms
    D/dalvikvm(30622): GC_CONCURRENT freed 536K, 5% free 14434K/15175K, paused 2ms+3ms
    D/dalvikvm(30622): GC_CONCURRENT freed 475K, 5% free 14471K/15175K, paused 2ms+6ms
    D/dalvikvm(30622): GC_CONCURRENT freed 505K, 5% free 14478K/15175K, paused 2ms+6ms
    D/dalvikvm(30622): GC_CONCURRENT freed 488K, 5% free 14435K/15175K, paused 2ms+3ms
    E/NotificationService(30121): Ignoring notification with icon==0: Notification(contentView=null vibrate=null,sound=null,defaults=0x0,flags=0x1)
    E/NotificationService(30121): Ignoring notification with icon==0: Notification(contentView=null vibrate=null,sound=null,defaults=0x0,flags=0x1)
    D/IMSFW (30370): IMSServiceStub$ManagerHandler: soft reset : 1
    D/IMSFW (30370): IMSServiceStub: ######### IMSFramework resets the stack ##########
    D/IMSFW (30370): NativeInterface: sotfReset: Entered
    I/IMS_JNI (30370): XAN_IMS_Framework_softReset_JNI : Enter
    I/Process ( 955): Sending signal. PID: 955 SIG: 9
    W/InputManagerService(30121): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41f02698
    I/ActivityManager(30121): Process com.init2winitapps.chargeclock (pid 955) has died.
    D/IMSFW (30370): RPMInterface$1: EVENT_RETRY_IMS_PDN Trigger
    D/IMSFW (30370): RPMInterface: startUsingNetworkFeature result : 0
    D/IMSFW (30370): RPMInterface: triggeringIMSRegistration
    D/IMSFW (30370): IMSServiceStub: state is------->CONNECTED
    D/IMSFW (30370): IMSServiceStub: registered------->false
    D/dalvikvm(30121): GC_CONCURRENT freed 1939K, 26% free 27323K/36615K, paused 8ms+11ms
    D/IMSFW (30370): IMSServiceStub: noOfInValidPcscfAddrs = 0
    D/IMSFW (30370): IMSServiceStub: state is------->CONNECTED
    D/IMSFW (30370): IMSServiceStub: registered------->false
    D/IMSFW (30370): IMSServiceStub: noOfInValidPcscfAddrs = 0
    D/IMSFW (30370): IMSServiceStub$ManagerHandler: Send request to register for IMS with p-cscf :2001:4888:2:fff0:a0:104:0:27
    D/IMSFW (30370): IMSServiceStub$ManagerHandler: Send request to register for IMS with p-cscf :2001:4888:2:fff0:a0:104:0:2b
    D/IMSFW (30370): IMSServiceStub$ManagerHandler: Send request to register for IMS with p-cscf :2001:4888:3:fff0:c0:104:0:27
    E/IMSFW (30370): IMSServiceStub$ManagerHandler: Stack Initialization is not yet complete
    D/IMSFW (30370): IMSServiceStub: Registering in Global Mode
    I/IMS_JNI (30370): XAN_IMS_Framework_Init_JNI
    D/IMS (30370): xan_core_init : Enter
    D/IMS (30370): [external/xanadu/Platform/Android/src/PlatformUIIntf.c:40] xan_core_init: XAN_ImsCore_EntryPoint: IMS core is already inited: No need to init once again: will continue for reg
    D/IMS (30370): [external/xanadu/Platform/Android/src/PlatformDaemon.c:86] xan_daemon_init: xan_daemon_init: Already Inited
    D/IMS (30370):
    I/IMS_JNI (30370): XAN_Set_Content_Type_JNI : Enter
    D/dalvikvm(30370): GC_CONCURRENT freed 431K, 4% free 14310K/14855K, paused 4ms+4ms
    I/IMS_JNI (30370): Entering native XAN_Set_SIP_Timers_JNI
    D/IMSFW (30370): IMSServiceStub: Initializing with isStackInitdone value : true
    D/IMSFW (30370): IMSServiceStub: Triggering IMS register
    I/IMS_JNI (30370): Enter XAN_IMS_Handle_NetworkEvent_JNI
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:632] XAN_IMSCore_EventCb: XAN_IMSCore_EventCb: ALWAYSON_ACTIVATE
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:637] XAN_IMSCore_EventCb: XAN_EVT_IMSCORE_ALWAYSON_ACTIVATE : state is none
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:2583] IMSCore_ExecFSM: IMSCore_ExecFSM: ims_state= 0
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:1343] IMSCore_StateNone: IMSCore_StateNone : Making IMS not active and Exiting
    D/IMS (30370): [external/xanadu/Platform/Android/src/PlatformDaemon.c:225] ims_daemon_evt_handler: SISO: ims_daemon_evt_handler: xan_q_pop failed....2
    D/IMS (30370):
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:457] XAN_IMSCore_NetworkListener: XAN_IMSCore_NetworkListener: XAN_INWK_EVT_PPP_OPEN
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:2583] IMSCore_ExecFSM: IMSCore_ExecFSM: ims_state= 0
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:2583] IMSCore_ExecFSM: IMSCore_ExecFSM: ims_state= 1
    D/IMS (30370): xan_get_ip_from_ifinet6(): found interface 'rmnet0' with index(16), scope(0)
    I/IMS (30370): LocalIPV6 value ==== 2600:1002:8005:ffae:0000:001e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:1000] XAN_INWK_UpdateSelfIP: XAN_INWK_UpdateSelfIP: Already memory allocated for self-ip, allocating...
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:1004] XAN_INWK_UpdateSelfIP: XAN_INWK_UpdateSelfIP: No memory allocated for self-ip, allocating...
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:1025] XAN_INWK_UpdateSelfIP: XAN_INWK_UpdateSelfIP: self ip is 2600:1002:8005:ffae:0:1e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:506] XAN_INWK_NetInfoUpdate: !!!No DHCP:!!!
    D/IMS (30370): xan_get_ip_from_ifinet6(): found interface 'rmnet0' with index(16), scope(0)
    I/IMS (30370): LocalIPV6 value ==== 2600:1002:8005:ffae:0000:001e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:141] __INwk_NetInfoUpdate: ImsProfile_NetInfoUpdate: self ip is 2600:1002:8005:ffae:0:1e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:316] __INwk_NetInfoUpdate: ImsProfile_NetInfoUpdate: pcsf ip is 2001:4888:2:fff0:a0:104:0:27
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:758] __ImsInit: __ImsInit : Already initialised
    D/IMS (30370):
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:1521] IMSCore_StateIdle: IMSCore_StateIdle: __ImsInit() failed
    D/IMS (30370):
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:356] XAN_IMSCore_NetworkListener: XAN_IMSCore_NetworkListener: XAN_INWK_EVT_SRV_AVAIL
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:2583] IMSCore_ExecFSM: IMSCore_ExecFSM: ims_state= 1
    D/IMS (30370): xan_get_ip_from_ifinet6(): found interface 'rmnet0' with index(16), scope(0)
    I/IMS (30370): LocalIPV6 value ==== 2600:1002:8005:ffae:0000:001e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:1000] XAN_INWK_UpdateSelfIP: XAN_INWK_UpdateSelfIP: Already memory allocated for self-ip, allocating...
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:1004] XAN_INWK_UpdateSelfIP: XAN_INWK_UpdateSelfIP: No memory allocated for self-ip, allocating...
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:1025] XAN_INWK_UpdateSelfIP: XAN_INWK_UpdateSelfIP: self ip is 2600:1002:8005:ffae:0:1e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:506] XAN_INWK_NetInfoUpdate: !!!No DHCP:!!!
    D/IMS (30370): xan_get_ip_from_ifinet6(): found interface 'rmnet0' with index(16), scope(0)
    I/IMS (30370): LocalIPV6 value ==== 2600:1002:8005:ffae:0000:001e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:141] __INwk_NetInfoUpdate: ImsProfile_NetInfoUpdate: self ip is 2600:1002:8005:ffae:0:1e:ba2c:c001
    D/IMS (30370): [external/xanadu/Framework/INetwork/src/ImsINetwork_Core.c:316] __INwk_NetInfoUpdate: ImsProfile_NetInfoUpdate: pcsf ip is 2001:4888:2:fff0:a0:104:0:27
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:758] __ImsInit: __ImsInit : Already initialised
    D/IMS (30370):
    D/IMS (30370): [external/xanadu/Framework/CoreControl/src/ImsCoreController.c:1521] IMSCore_StateIdle: IMSCore_StateIdle: __ImsInit() failed
    D/IMS (30370):
    D/IMS (30370): [external/xanadu/Platform/Android/src/PlatformDaemon.c:225] ims_daemon_evt_handler: SISO: ims_daemon_evt_handler: xan_q_pop failed....2
    D/IMS (30370):
    D/dalvikvm(30880): GC_FOR_ALLOC freed 1881K, 9% free 21842K/23879K, paused 51ms
    I/ActivityManager(30121): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.jtb.alogcat/.LogActivity bnds=[200,655][360,855]} from pid 30880
    I/WindowManager(30121): createSurface Window{41cbae10 Starting org.jtb.alogcat paused=false}: DRAW NOW PENDING
    I/ActivityManager(30121): Start proc org.jtb.alogcat for activity org.jtb.alogcat/.LogActivity: pid=1103 uid=10116 gids={1007, 1015}
    I/dalvikvm( 1103): Turning on JNI app bug workarounds for target SDK version 4...
    V/PhoneStatusBar(30189): setLightsOn(true)
    D/OpenGLRenderer(30880): Flushing caches (mode 1)
    V/alogcat ( 1103): created
    V/alogcat ( 1103): started
    I/alogcat ( 1103): new intent: android.intent.action.MAIN
    D/alogcat ( 1103): canceling periodic saves
    D/alogcat ( 1103): starting ...
    V/alogcat ( 1103): resumed
    D/OpenGLRenderer(30880): Flushing caches (mode 0)
    I/WindowManager(30121): createSurface Window{41ee9400 org.jtb.alogcat/org.jtb.alogcat.LogActivity paused=false}: DRAW NOW PENDING
    I/WindowManager(30121): createSurface Window{423c4028 Toast paused=false}: DRAW NOW PENDING
     
Search tags for this page
android app display clock while charging
,
android charging clock
,
android clock app while charging
,

android clock when charging

,

android display clock while charging

,
android show clock when charging
,
android start app when charging
,
charging clock android
,
disable desk clock android
,
how to standby in clock while charging in android