react-native-background-timer
react-native-background-timer copied to clipboard
Setting a timer for a long period of time cause warning.
Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.
How to fix this warning?
Well, I guess react-native-background-timer
doesn't support long timers, ie. doesn't leverage the AlarmManager solution in Android? Quite disappointing.
I'm getting another kind of warning:
Warning: Please report: Excessive number of pending callbacks: 501. Some pending callbacks that might have leaked by never being called from native code: {"10763":{},"10764":{},"10765":{},"10766":{},"10767":{},"10768":{},"10769":{},"10770":{},"10771":{},"10772":{},"10773":{},"10774":{},"10775":{},"10776":{},"10777":{},"10778":{},"10779":{},"10780":{},"10781":{},"10782":{},"10783":{},"10784":{},"10785":{},"10786":{},"10787":{},"10788":{},"10789":{},"10790":{},"10791":{},"10792":{},"10793":{},"10794":{},"10795":{},"10796":{},"10797":{},"10798":{},"10799":{},"10800":{},"10801":{},"10802":{},"10803":{},"10804":{},"10805":{},"10806":{},"10807":{},"10808":{},"10809":{},"10810":{},"10811":{},"10812":{},"10813":{},"10814":{},"10815":{},"10816":{},"10817":{},"10818":{},"10819":{},"10820":{},"10821":{},"10822":{},"10823":{},"10824":{},"10825":{},"10826":{},"10827":{},"10828":{},"10829":{},"10830":{},"10831":{},"10832":{},"10833":{},"10834":{},"10835":{},"10836":{},"10837":{"module":"RNBackgroundTimer","method":"setTimeout"},"10838":{"module":"RNBackgroundTimer","method":"setTimeout"},"10839":{"module":"RNBackgroundTimer","method":"setTimeout"},"10840":{"module":"RNBackgroundTimer","method":"setTimeout"},"10841":{"module":"RNBackgroundTimer","method":"setTimeout"},"10842":{},"10843":{},"10844":{"module":"RNBackgroundTimer","method":"setTimeout"},"10845":{"module":"RNBackgroundTimer","method":"setTimeout"},"10846":{"module":"RNBackgroundTimer","method":"setTimeout"},"10847":{"module":"RNBackgroundTimer","method":"setTimeout"},"10848":{"module":"RNBackgroundTimer","method":"setTimeout"},"10849":{},"10850":{},"10851":{},"10852":{},"10853":{},"10854":{},"10855":{},"10856":{},"10857":{},"10858":{},"10859":{},"10860":{},"10861":{},"10862":{},"10863":{},"10864":{},"10865":{},"10866":{},"10867":{},"10868":{},"10874":{},"10875":{},"10881":{},"10882":{},"10883":{},"10884":{},"10885":{},"10886":{},"10887":{},"10888":{},"10889":{},"10890":{},"10891":{},"10892":{},"10893":{},"10894":{},"10895":{},"10896":{},"10897":{},"10898":{},"10899":{},"10900":{},"10901":{},"10902":{},"10903":{},"10904":{},"10905":{},"10906":{},"10907":{},"10908":{},"10909":{},"10910":{},"10911":{},"10912":{},"10913":{},"10914":{},"10915":{},"10916":{},"10917":{},"10918":{},"10919":{},"10920":{},"10921":{},"10922":{},"10923":{},"10924":{},"10925":{},"10926":{},"10927":{},"10928":{},"10929":{},"10930":{},"10931":{},"10932":{},"10933":{},"10934":{},"10935":{},"10936":{},"10937":{},"10938":{},"10939":{},"10940":{},"10941":{},"10942":{},"10943":{},"10944":{},"10945":{},"10946":{},"10947":{},"10948":{},"10949":{},"10950":{},"10951":{},"10952":{},"10953":{},"10954":{},"10955":{},"10956":{},"10957":{},"10958":{},"10959":{},"10960":{},"10961":{},"10962":{},"10963":{},"10964":{},"10965":{},"10966":{},"10967":{},"10968":{},"10969":{},"10970":{},"10971":{},"10972":{},"10973":{},"10974":{},"10975":{},"10976":{},"10977":{},"10978":{},"10979":{},"10980":{},"10981":{},"10982":{},"10983":{},"10984":{},"10985":{},"10986":{},"10987":{},"10988":{},"10989":{},"10990":{},"10991":{},"10992":{},"10993":{},"10994":{},"10995":{},"10996":{},"10997":{},"10998":{},"10999":{},"11000":{},"11001":{},"11002":{},"11003":{},"11004":{},"11005":{},"11006":{},"11007":{},"11008":{},"11009":{},"11010":{},"11011":{},"11012":{},"11013":{},"11014":{},"11015":{},"11016":{},"11017":{},"11018":{},"11019":{},"11020":{},"11021":{},"11022":{},"11023":{},"11024":{},"11025":{},"11026":{},"11027":{},"11028":{},"11029":{},"11030":{},"11031":{},"11032":{},"11033":{},"11034":{},"11035":{},"11036":{},"11037":{},"11038":{},"11039":{},"11040":{},"11041":{},"11042":{},"11043":{},"11044":{},"11045":{},"11046":{},"11047":{},"11048":{},"11049":{},"11050":{},"11051":{},"11052":{},"11053":{},"11054":{},"11055":{},"11056":{},"11057":{},"11058":{},"11059":{},"11060":{},"11061":{},"11062":{},"11063":{},"11064":{},"11065":{},"11066":{},"11067":{},"11068":{},"11069":{},"11070":{},"11071":{},"11072":{},"11073":{},"11074":{},"11075":{},"11076":{},"11077":{},"11078":{},"11079":{},"11080":{},"11081":{},"11082":{},"11083":{},"11084":{},"11085":{},"11086":{},"11087":{},"11088":{},"11089":{},"11090":{},"11091":{},"11092":{},"11093":{},"11094":{},"11095":{},"11096":{},"11097":{},"11098":{},"11099":{},"11100":{},"11101":{},"11102":{},"11103":{},"11104":{},"11105":{},"11106":{},"11107":{},"11108":{},"11109":{},"11110":{},"11111":{},"11112":{},"11113":{},"11114":{},"11115":{},"11116":{},"11117":{},"11118":{},"11119":{},"11120":{},"11121":{},"11122":{},"11123":{},"11124":{},"11125":{},"11126":{},"11127":{},"11128":{},"11129":{},"11130":{},"11131":{},"11132":{},"11133":{},"11134":{},"11135":{},"11136":{},"11137":{},"11138":{},"11139":{},"11140":{},"11141":{},"11142":{},"11143":{},"11144":{},"11145":{},"11146":{},"11147":{},"11148":{},"11149":{},"11150":{},"11151":{},"11152":{},"11153":{},"11154":{},"11155":{},"11156":{},"11157":{},"11158":{},"11159":{},"11160":{},"11161":{},"11162":{},"11163":{},"11164":{},"11165":{},"11166":{},"11167":{},"11168":{},"11169":{},"11170":{},"11171":{},"11172":{},"11173":{},"11174":{},"11175":{},"11176":{},"11177":{},"11178":{},"11179":{},"11180":{},"11181":{},"11182":{},"11183":{},"11184":{},"11185":{},"11186":{},"11187":{},"11188":{},"11189":{},"11190":{},"11191":{},"11192":{},"11193":{},"11194":{},"11195":{},"11196":{},"11197":{},"11198":{},"11199":{},"11200":{},"11201":{},"11202":{},"11203":{},"11204":{},"11205":{},"11206":{},"11207":{},"11208":{},"11209":{},"11210":{},"11211":{},"11212":{},"11213":{},"11214":{},"11215":{},"11216":{},"11217":{},"11218":{},"11219":{},"11220":{},"11221":{},"11222":{},"11223":{},"11224":{},"11225":{},"11226":{},"11227":{},"11228":{},"11229":{},"11230":{},"11231":{},"11232":{},"11233":{},"11234":{},"11235":{},"11236":{},"11237":{},"11238":{},"11239":{},"11240":{},"11241":{},"11242":{},"11243":{"module":"RNBackgroundTimer","method":"setTimeout"},"11244":{"module":"RNBackgroundTimer","method":"setTimeout"},"11245":{"module":"RNBackgroundTimer","method":"setTimeout"},"11246":{"module":"RNBackgroundTimer","method":"setTimeout"},"11247":{"module":"RNBackgroundTimer","method":"setTimeout"},"11248":{"module":"RNBackgroundTimer","method":"setTimeout"},"11249":{"module":"RNBackgroundTimer","method":"setTimeout"},"11250":{"module":"RNBackgroundTimer","method":"setTimeout"},"11251":{"module":"RNBackgroundTimer","method":"setTimeout"},"11252":{"module":"RNBackgroundTimer","method":"setTimeout"},"11253":{"module":"RNBackgroundTimer","method":"setTimeout"},"11254":{"module":"RNBackgroundTimer","method":"setTimeout"},"11255":{"module":"RNBackgroundTimer","method":"setTimeout"},"11256":{"module":"RNBackgroundTimer","method":"setTimeout"},"11257":{"module":"RNBackgroundTimer","method":"setTimeout"},"11258":{"module":"RNBackgroundTimer","method":"setTimeout"},"11259":{"module":"RNBackgroundTimer","method":"setTimeout"},"11260":{"module":"RNBackgroundTimer","method":"setTimeout"},"11261":{"module":"RNBackgroundTimer","method":"setTimeout"},"11262":{"module":"RNBackgroundTimer","method":"setTimeout"},"11263":{"module":"RNBackgroundTimer","method":"setTimeout"},"11264":{"module":"RNBackgroundTimer","method":"setTimeout"},"11265":{"module":"RNBackgroundTimer","method":"setTimeout"},"11266":{"module":"RNBackgroundTimer","method":"setTimeout"},"11267":{"module":"RNBackgroundTimer","method":"setTimeout"},"11268":{"module":"RNBackgroundTimer","method":"setTimeout"},"11269":{"module":"RNBackgroundTimer","method":"setTimeout"},"11270":{"module":"RNBackgroundTimer","method":"setTimeout"},"11271":{"module":"RNBackgroundTimer","method":"setTimeout"},"11272":{"module":"RNBackgroundTimer","method":"setTimeout"},"11273":{"module":"RNBackgroundTimer","method":"setTimeout"}}
What do you think? Thanks in advance! <3