Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]not calling api also in your example #373

Closed
meet82 opened this issue Jun 4, 2024 · 10 comments
Closed

[BUG]not calling api also in your example #373

meet82 opened this issue Jun 4, 2024 · 10 comments
Labels
IGNORED ISSUE TEMPLATE Don't ignore the issue template. stale

Comments

@meet82
Copy link

meet82 commented Jun 4, 2024

Performing hot reload...
Syncing files to device sdk gphone64 arm64...
Reloaded 1 of 1104 libraries in 758ms (compile: 87 ms, reload: 390 ms, reassemble: 129 ms).
D/EGL_emulation( 5063): app_time_stats: avg=385493.09ms min=385493.09ms max=385493.09ms count=1
D/TSBackgroundFetch( 5063): ☯️ onPause
D/TSBackgroundFetch( 5063): ☯️ onStop
D/TSBackgroundFetch( 5063): ☯️ HeadlessMode? true
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e17d50: maj 3 min 0 rcv 3
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e15950: maj 3 min 0 rcv 3
D/HostConnection( 5063): createUnique: call
D/HostConnection( 5063): HostConnection::get() New Host Connection established 0xb400007079e18410, tid 5545
D/HostConnection( 5063): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 5063): eglMakeCurrent: 0xb400007079e15950: ver 3 0 (tinfo 0x728e49f200) (first time)
D/TSBackgroundFetch( 5063): ☯️ onStart
D/TSBackgroundFetch( 5063): ☯️ onResume
D/HostConnection( 5063): createUnique: call
D/HostConnection( 5063): HostConnection::get() New Host Connection established 0xb400007079e1a090, tid 5544
D/HostConnection( 5063): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 5063): eglMakeCurrent: 0xb400007079e17d50: ver 3 0 (tinfo 0x728e49f100) (first time)
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e1dc90: maj 3 min 0 rcv 3
D/TSBackgroundFetch( 5063): - configure
D/TSBackgroundFetch( 5063): Re-configured existing task
I/TSBackgroundFetch( 5063): - cancel taskId=flutter_background_fetch, jobId=999
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "flutter_background_fetch",
D/TSBackgroundFetch( 5063): "isFetchTask": true,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": true,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": false,
D/TSBackgroundFetch( 5063): "periodic": true,
D/TSBackgroundFetch( 5063): "delay": -1
D/TSBackgroundFetch( 5063): }
I/flutter ( 5063): [BackgroundFetch] configure success: 2
D/TSBackgroundFetch( 5063): - registerTask: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "com.transistorsoft.customtask",
D/TSBackgroundFetch( 5063): "isFetchTask": false,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": false,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": true,
D/TSBackgroundFetch( 5063): "periodic": false,
D/TSBackgroundFetch( 5063): "delay": 10000
D/TSBackgroundFetch( 5063): }
W/Parcel ( 5063): Expecting binder but got null!
D/EGL_emulation( 5063): app_time_stats: avg=2444.97ms min=48.48ms max=7200.33ms count=3
D/TSBackgroundFetch( 5063): ☯️ onPause
D/TSBackgroundFetch( 5063): ☯️ onStop
D/TSBackgroundFetch( 5063): ☯️ HeadlessMode? true
D/TSBackgroundFetch( 5063): - Background Fetch event received: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): 💀 [HeadlessTask com.transistorsoft.customtask]
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e16490: maj 3 min 0 rcv 3
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e1a090: maj 3 min 0 rcv 3
D/HostConnection( 5063): createUnique: call
D/HostConnection( 5063): HostConnection::get() New Host Connection established 0xb400007079e18e90, tid 5568
D/HostConnection( 5063): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 5063): eglMakeCurrent: 0xb400007079e1a090: ver 3 0 (tinfo 0x728e49f100) (first time)
D/TSBackgroundFetch( 5063): [HeadlessTask] waiting for client to initialize
I/TSBackgroundFetch( 5063): $ initialized
I/flutter ( 5063): [BackgroundFetch] Headless event received: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - finish: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - FetchAlarmReceiver finish
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e1fcd0: maj 3 min 0 rcv 3
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e21650: maj 3 min 0 rcv 3
D/HostConnection( 5063): createUnique: call
D/HostConnection( 5063): HostConnection::get() New Host Connection established 0xb400007079e21410, tid 5625
D/HostConnection( 5063): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 5063): eglMakeCurrent: 0xb400007079e21650: ver 3 0 (tinfo 0x728e49f200) (first time)
D/TSBackgroundFetch( 5063): ☯️ onStart
D/TSBackgroundFetch( 5063): ☯️ onResume
D/HostConnection( 5063): createUnique: call
D/HostConnection( 5063): HostConnection::get() New Host Connection established 0xb400007079e15b90, tid 5624
D/HostConnection( 5063): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 5063): eglMakeCurrent: 0xb400007079e1fcd0: ver 3 0 (tinfo 0x728e49f280) (first time)
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e1c850: maj 3 min 0 rcv 3
D/TSBackgroundFetch( 5063): - configure
D/TSBackgroundFetch( 5063): Re-configured existing task
I/TSBackgroundFetch( 5063): - cancel taskId=flutter_background_fetch, jobId=999
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "flutter_background_fetch",
D/TSBackgroundFetch( 5063): "isFetchTask": true,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": true,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": false,
D/TSBackgroundFetch( 5063): "periodic": true,
D/TSBackgroundFetch( 5063): "delay": -1
D/TSBackgroundFetch( 5063): }
W/Parcel ( 5063): Expecting binder but got null!
I/flutter ( 5063): [BackgroundFetch] configure success: 2
D/TSBackgroundFetch( 5063): - registerTask: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "com.transistorsoft.customtask",
D/TSBackgroundFetch( 5063): "isFetchTask": false,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": false,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": true,
D/TSBackgroundFetch( 5063): "periodic": false,
D/TSBackgroundFetch( 5063): "delay": 10000
D/TSBackgroundFetch( 5063): }
D/TSBackgroundFetch( 5063): - Background Fetch event received: com.transistorsoft.customtask
I/flutter ( 5063): [BackgroundFetch] Event received: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - finish: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - FetchAlarmReceiver finish
D/EGL_emulation( 5063): app_time_stats: avg=3411.55ms min=61.41ms max=10052.67ms count=3
D/EGL_emulation( 5063): app_time_stats: avg=19358.36ms min=19358.36ms max=19358.36ms count=1
D/TSBackgroundFetch( 5063): ☯️ onPause
D/TSBackgroundFetch( 5063): ☯️ onStop
D/TSBackgroundFetch( 5063): ☯️ HeadlessMode? true
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e1c9d0: maj 3 min 0 rcv 3
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e21650: maj 3 min 0 rcv 3
D/HostConnection( 5063): createUnique: call
D/HostConnection( 5063): HostConnection::get() New Host Connection established 0xb400007079e15b90, tid 5665
D/HostConnection( 5063): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 5063): eglMakeCurrent: 0xb400007079e21650: ver 3 0 (tinfo 0x728e49f280) (first time)
D/TSBackgroundFetch( 5063): ☯️ onStart
D/TSBackgroundFetch( 5063): ☯️ onResume
D/HostConnection( 5063): createUnique: call
D/HostConnection( 5063): HostConnection::get() New Host Connection established 0xb400007079e217d0, tid 5664
D/HostConnection( 5063): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 5063): eglMakeCurrent: 0xb400007079e1c9d0: ver 3 0 (tinfo 0x728e49f200) (first time)
D/EGL_emulation( 5063): eglCreateContext: 0xb400007079e1f6d0: maj 3 min 0 rcv 3
D/TSBackgroundFetch( 5063): - configure
D/TSBackgroundFetch( 5063): Re-configured existing task
I/TSBackgroundFetch( 5063): - cancel taskId=flutter_background_fetch, jobId=999
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "flutter_background_fetch",
D/TSBackgroundFetch( 5063): "isFetchTask": true,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": true,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": false,
D/TSBackgroundFetch( 5063): "periodic": true,
D/TSBackgroundFetch( 5063): "delay": -1
D/TSBackgroundFetch( 5063): }
I/flutter ( 5063): [BackgroundFetch] configure success: 2
D/TSBackgroundFetch( 5063): - registerTask: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "com.transistorsoft.customtask",
D/TSBackgroundFetch( 5063): "isFetchTask": false,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": false,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": true,
D/TSBackgroundFetch( 5063): "periodic": false,
D/TSBackgroundFetch( 5063): "delay": 10000
D/TSBackgroundFetch( 5063): }
W/Parcel ( 5063): Expecting binder but got null!
D/TSBackgroundFetch( 5063): - Background Fetch event received: com.transistorsoft.customtask
I/flutter ( 5063): [BackgroundFetch] Event received: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - finish: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - FetchAlarmReceiver finish
D/EGL_emulation( 5063): app_time_stats: avg=5047.08ms min=99.78ms max=9994.38ms count=2
W/undfetchexample( 5063): Cleared Reference was only reachable from finalizer (only reported once)
D/EGL_emulation( 5063): app_time_stats: avg=243140.48ms min=243140.48ms max=243140.48ms count=1
D/TSBackgroundFetch( 5063): - stop
I/TSBackgroundFetch( 5063): - cancel taskId=flutter_background_fetch, jobId=999
I/flutter ( 5063): [BackgroundFetch] stop success: 2
D/EGL_emulation( 5063): app_time_stats: avg=195.13ms min=6.43ms max=5203.36ms count=29
D/TSBackgroundFetch( 5063): - start
D/TSBackgroundFetch( 5063): - registerTask: flutter_background_fetch (jobId: 999)
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "flutter_background_fetch",
D/TSBackgroundFetch( 5063): "isFetchTask": true,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": true,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": false,
D/TSBackgroundFetch( 5063): "periodic": true,
D/TSBackgroundFetch( 5063): "delay": -1
D/TSBackgroundFetch( 5063): }
D/EGL_emulation( 5063): app_time_stats: avg=53.07ms min=11.23ms max=716.06ms count=19
I/flutter ( 5063): [BackgroundFetch] start success: 2
I/flutter ( 5063): [BackgroundFetch] status: 2
D/TSBackgroundFetch( 5063): - registerTask: com.transistorsoft.customtask (jobId: -359368280)
D/TSBackgroundFetch( 5063): {
D/TSBackgroundFetch( 5063): "taskId": "com.transistorsoft.customtask",
D/TSBackgroundFetch( 5063): "isFetchTask": false,
D/TSBackgroundFetch( 5063): "minimumFetchInterval": 15,
D/TSBackgroundFetch( 5063): "stopOnTerminate": false,
D/TSBackgroundFetch( 5063): "requiredNetworkType": 0,
D/TSBackgroundFetch( 5063): "requiresBatteryNotLow": false,
D/TSBackgroundFetch( 5063): "requiresCharging": false,
D/TSBackgroundFetch( 5063): "requiresDeviceIdle": false,
D/TSBackgroundFetch( 5063): "requiresStorageNotLow": false,
D/TSBackgroundFetch( 5063): "startOnBoot": false,
D/TSBackgroundFetch( 5063): "jobService": "com.transistorsoft.flutter.backgroundfetch.HeadlessTask",
D/TSBackgroundFetch( 5063): "forceAlarmManager": false,
D/TSBackgroundFetch( 5063): "periodic": false,
D/TSBackgroundFetch( 5063): "delay": 10000
D/TSBackgroundFetch( 5063): }
D/EGL_emulation( 5063): app_time_stats: avg=88.89ms min=14.43ms max=1384.55ms count=19
D/TSBackgroundFetch( 5063): - Background Fetch event received: com.transistorsoft.customtask
I/flutter ( 5063): [BackgroundFetch] Event received: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - finish: com.transistorsoft.customtask
D/TSBackgroundFetch( 5063): - jobFinished
D/EGL_emulation( 5063): app_time_stats: avg=281.54ms min=14.21ms max=9557.50ms count=36

@christocracy
Copy link
Member

This issue template is required, not optional,

Your Environment

  • Plugin version:
  • Platform: iOS or Android
  • OS version:
  • Device manufacturer / model:
  • Flutter info (flutter info, flutter doctor):
  • Plugin config

To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4.

Debug logs

  • ios XCode logs,
  • Android: $ adb logcat

Additional context
Add any other context about the problem here.

@christocracy christocracy added the IGNORED ISSUE TEMPLATE Don't ignore the issue template. label Jun 4, 2024
@christocracy
Copy link
Member

Plugin config

!!

@christocracy
Copy link
Member

You posted everything except what I wanted (including private Google api key in your AndroidManifest).

post your dart BackgroundGeolocation plugin Config.

@meet82
Copy link
Author

meet82 commented Jun 4, 2024 via email

@meet82
Copy link
Author

meet82 commented Jun 5, 2024

void main()async {

WidgetsFlutterBinding.ensureInitialized();
await GetStorage.init();
//await initializeService();
//Workmanager().initialize(callbackDispatcher,isInDebugMode: true,);
BackgroundFetch.registerHeadlessTask(backgroundFetchHeadlessTask);

runApp(const MyApp());
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@pragma('vm:entry-point')
void backgroundFetchHeadlessTask(HeadlessTask task) async {
String taskId = task.taskId;
bool isTimeout = task.timeout;
if (isTimeout) {
print("[BackgroundFetch] Headless task timed-out: $taskId");
BackgroundFetch.finish(taskId);
return;
}
print('[BackgroundFetch] Headless event received.-=-=-=-=');
try {
await GetStorage.init();
Get.put(DashBoardController(false)).getLocation(isCall: true);

} catch (e) {
  print('Error: $e');

}

if (taskId == 'flutter_background_fetch') {
BackgroundFetch.scheduleTask(TaskConfig(
taskId: "com.transistorsoft.customtask",
delay: 5000,
periodic: false,
forceAlarmManager: false,
stopOnTerminate: false,
enableHeadless: true
));
}
BackgroundFetch.finish(taskId);
}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Future initPlatformState() async {
// Configure BackgroundFetch.
int status = await BackgroundFetch.configure(BackgroundFetchConfig(
minimumFetchInterval: 2,
stopOnTerminate: false,
enableHeadless: true,
requiresBatteryNotLow: false,
requiresCharging: false,
requiresStorageNotLow: false,
requiresDeviceIdle: false,
requiredNetworkType: NetworkType.NONE
), (String taskId) async {
await GetStorage.init();
// <-- Event handler
// This is the fetch-event callback.
print("[BackgroundFetch] Event received -=-=-=- $taskId-=-=-=");
if(box.read("isOut")==true&&box.read("isOut")!=null){
Get.put(DashBoardController(false)).getLocation(isCall: true);
}
// IMPORTANT: You must signal completion of your task or the OS can punish your app
// for taking too long in the background.
BackgroundFetch.finish(taskId);
}, (String taskId) async { // <-- Task timeout handler.
// This task has exceeded its allowed running-time. You must stop what you're doing and immediately .finish(taskId)
print("[BackgroundFetch] TASK TIMEOUT taskId: $taskId");
BackgroundFetch.finish(taskId);
});
print('[BackgroundFetch] configure success: -=-=-=-=-$status');
BackgroundFetch.scheduleTask(TaskConfig(
taskId: "com.transistorsoft.customtask",
delay: 10000,
periodic: false,
forceAlarmManager: true,
stopOnTerminate: false,
enableHeadless: true
));

 // If the widget was removed from the tree while the asynchronous platform
 // message was in flight, we want to discard the reply rather than calling
 // setState to update our non-existent appearance.
 if (!mounted) return;

}

@meet82
Copy link
Author

meet82 commented Jun 5, 2024

Get.put(DashBoardController(false)).getLocation(isCall: true);
this one my api call
i need to call every 15 min
currently working in if your application in paused mode but application terminated not calling api

please let me know i very tried

@christocracy
Copy link
Member

@meet82
Copy link
Author

meet82 commented Jun 22, 2024

hello can you please help me i tried work if app is kill how to work in my case not working

in your example not showing api call with location

i need to every 15 call api if app is kill

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jul 23, 2024
Copy link

github-actions bot commented Aug 6, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IGNORED ISSUE TEMPLATE Don't ignore the issue template. stale
Projects
None yet
Development

No branches or pull requests

2 participants