2012-07-20 5 views
1

나는 ... 잘하지 않는하지 않습니다 때 원할 때 작동하는 위젯을 가지고! 특히 휴대 전화를 재부팅하고 위젯을 탭하면 물건이 제대로 작동해야합니다. 그리고 잠시 동안은 계속 위젯을 계속 사용할 수 있으며 모든 것이 잘 작동합니다. 그러나 마침내 (아마 1 시간처럼?) 그것은 단지 작동을 멈춘다. logcat에서 내 코드는 전혀 실행되지 않으므로 탭이 내 앱으로 전달되지 않습니다. 내 사고 과정은 이런 일이 발생할 때 내 코드가 실행되지 않기 때문에 문제가 매니페스트에 있거나 내가 알지 못하는 다른 것이어야한다는 것입니다.안드로이드 위젯은 ... 때때로

여기 그것이 작동 할 때의 로그 캣입니다. 여기서 마지막 줄은 내 코드에서 온 것입니다 :

07-20 13:00:54.638: E/MP-Decision(1265): UP Ld:85 Nw:1.990000 Tw:140 rq:1.000000 seq:141.000000 
07-20 13:00:54.818: I/InputReader(533): Touch event's action is 0x0 (deviceType=0) [pCnt=1, pending(waiting finished signal)=0, s=0.4 ] 
07-20 13:00:54.818: I/InputDispatcher(533): Delivering touch to current input target: action: 0x0 
07-20 13:00:54.818: D/lights(533): write_int /sys/class/leds/button-backlight/brightness = 255 
07-20 13:00:54.818: I/PowerManagerService(533): Ulight 0x3->0x7|0x0 
07-20 13:00:54.818: D/PowerManagerService(533): setLightBrightness : mButtonLight : 51 
07-20 13:00:54.908: I/InputReader(533): Touch event's action is 0x1 (deviceType=0) [pCnt=1, pending(waiting finished signal)=0, s=] 
07-20 13:00:54.908: I/InputDispatcher(533): Delivering touch to current input target: action: 0x1 
07-20 13:00:54.918: I/AudioPolicyManagerBase(229): getSituationVolume: isBTConnected:0 isHeadConnected:0 
07-20 13:00:54.918: V/AudioPolicyManagerBase(229): getParamFromPolicy deviceInt = 0, situationInt = 1, situationVolume = 0.500000 
07-20 13:00:54.918: D/AudioService(533): playSoundEffect() 
07-20 13:00:54.918: W/AudioTrack(533): Minimum buffer size corrected from 2048 to 4096 
07-20 13:00:54.918: V/AudioPolicyManagerBase(229): startOutput() output 1, stream 1, session 18 
07-20 13:00:54.918: V/AudioPolicyManagerBase(229): getDeviceForStrategy() from cache strategy 0, device 2 
07-20 13:00:54.918: V/AudioPolicyManagerBase(229): changeRefCount() stream 1, count 1 
07-20 13:00:54.918: V/AudioPolicyManagerBase(229): getDeviceForStrategy() from cache strategy 0, device 2 
07-20 13:00:54.918: V/AudioPolicyManagerBase(229): getNewDevice() selected device 2 
07-20 13:00:54.918: V/AudioPolicyManagerALSA(229): setOutputDevice() output 1 device 2 delayMs 0 force 0 
07-20 13:00:54.918: V/AudioPolicyManagerALSA(229): setOutputDevice output :0x1 mCurDevice:0x2 
07-20 13:00:54.918: V/AudioPolicyManagerALSA(229): setOutputDevice() setting same device 2 or null device for output 1 
07-20 13:00:54.918: D/PHCA_PhcaAppWidgetProvider(2316): onReceive(); action = com.skipmorrow.phca.PhcaAppWidgetProvider.WIDGET_CLICKED 

그리고 작동하지 않을 때의 logcat은 다음과 같습니다.

07-20 12:53:41.012: I/InputReader(534): Touch event's action is 0x0 (deviceType=0) [pCnt=1, pending(waiting finished signal)=0, s=0.160 ] 
07-20 12:53:41.012: I/InputDispatcher(534): Delivering touch to current input target: action: 0x0 
07-20 12:53:41.012: D/lights(534): write_int /sys/class/leds/button-backlight/brightness = 255 
07-20 12:53:41.012: I/PowerManagerService(534): Ulight 0x3->0x7|0x0 
07-20 12:53:41.012: D/PowerManagerService(534): setLightBrightness : mButtonLight : 51 
07-20 12:53:41.112: I/InputReader(534): Touch event's action is 0x1 (deviceType=0) [pCnt=1, pending(waiting finished signal)=0, s=] 
07-20 12:53:41.112: I/InputDispatcher(534): Delivering touch to current input target: action: 0x1 
07-20 12:53:41.112: I/AudioPolicyManagerBase(230): getSituationVolume: isBTConnected:0 isHeadConnected:0 
07-20 12:53:41.112: V/AudioPolicyManagerBase(230): getParamFromPolicy deviceInt = 0, situationInt = 1, situationVolume = 0.500000 
07-20 12:53:41.112: D/AudioService(534): playSoundEffect() 
07-20 12:53:41.112: W/AudioTrack(534): Minimum buffer size corrected from 2048 to 4096 
07-20 12:53:41.112: V/AudioPolicyManagerBase(230): startOutput() output 1, stream 1, session 153 
07-20 12:53:41.112: V/AudioPolicyManagerBase(230): getDeviceForStrategy() from cache strategy 0, device 2 
07-20 12:53:41.112: V/AudioPolicyManagerBase(230): changeRefCount() stream 1, count 1 
07-20 12:53:41.112: V/AudioPolicyManagerBase(230): getDeviceForStrategy() from cache strategy 0, device 2 
07-20 12:53:41.112: V/AudioPolicyManagerBase(230): getNewDevice() selected device 2 
07-20 12:53:41.112: V/AudioPolicyManagerALSA(230): setOutputDevice() output 1 device 2 delayMs 0 force 0 
07-20 12:53:41.112: V/AudioPolicyManagerALSA(230): setOutputDevice output :0x1 mCurDevice:0x2 
07-20 12:53:41.112: V/AudioPolicyManagerALSA(230): setOutputDevice() setting same device 2 or null device for output 1 
07-20 12:53:41.112: V/AudioPolicyManagerBase(230): releaseOutput() 1 

나는 문제가되는 것이 눈에 띄지 않습니다. Btw은

<receiver android:name="com.skipmorrow.phca.PhcaAppWidgetProvider" > 
    <intent-filter> 
     <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> 
     <action android:name="com.skipmorrow.phca.PhcaAppWidgetProvider.WIDGET_CLICKED" /> 
     <action android:name="com.skipmorrow.phca.PhcaAppWidgetProvider.VARIABLE_UPDATED" /> 
     <action android:name="android.appwidget.action.APPWIDGET_DELETED"/> 
     <action android:name="CORRECT_PIN_ENTERED_FOR_WIDGET"/> 
    </intent-filter> 
    <meta-data android:name="android.appwidget.provider" 
       android:resource="@xml/phca_widget_info" /> 
</receiver> 

, 나는 삼성 갤럭시 S3의 실행 ICS를 사용하고 있습니다 :

다음은 widgetProvider에 대한 매니페스트 섹션입니다. 내 응용 프로그램은 주말의 minSdkVersion = "8"와 targetSdkVersion을 = "8"

아무 대답이 없다,하지만 몇 가지 문제 해결을했다. 나는 아직도 문제가있다. 그러나 나는 추가적인 정보를 가지고있다.

위젯은 위젯의 텍스트를 제공하는 백그라운드 서비스에서 업데이트합니까. 그러나 위젯은 클릭 할 때해야 할 일을 항상 수행하지는 않습니다. 즉, 클릭이 제대로 처리되지 않아요 경우에도, 나는 아직도 위젯의 텍스트를 업데이트 할 수 있습니다, 그래서 도움이된다면 위젯은 완전히 분리되지 않습니다. 클릭 응답이오고가는 것 같습니다. 즉, 재부팅 한 후에 잠시 동안 클릭이 작동 한 다음 잠시 작동을 멈춘 다음 다시 작업을 시작하는 것입니다. 내의 AppWidgetProvider는의 onUpdate, onEnabled, onDeleted, onDisabled 및 onReceive 방법을 무시하지만, 난 단지 onReceive 메서드를 사용하여 수동으로 각각의 의도를 추적 할 수 있습니다. onReceive 메서드의 첫 번째 줄은 로그에 기록되므로 클릭이 작동하지 않을 때 코드가 내 AppWidgetProvider에서 전혀 실행되지 않는다는 것을 알 수 있습니다. 그래야 문제가 내 AppWidgetProvider에 있다고 생각할 수 있습니다. 내 매니페스트에 ???

사용 권한 문제 일 수 있습니까? 또는 수신기를 올바르게 등록하지 않았습니까?

답변

관련 문제