react-native-background-timer icon indicating copy to clipboard operation
react-native-background-timer copied to clipboard

FAILED Plugin, APP not working when in background mode.

Open shafiqshams opened this issue 7 years ago • 3 comments

It was a complete waste of time. I tried this plugin and configured everything but when app in background mode it stop working. Whats the solution?

shafiqshams avatar Nov 14 '18 11:11 shafiqshams

It is strange, I just install the new version of react-native 0.57, everything works like a charm.

Steps: 1/ Create new project by using "react-native init <Project-name>" 2/ Go in to the project, install react-native-background-timer by "yarn add react-native-background-timer" and "react-native link react-native-background-timer"

That is it. Hope it help

LuongTruong avatar Jan 11 '19 08:01 LuongTruong

Okay I will try.

shafiqshams avatar Jan 14 '19 07:01 shafiqshams

Hi @ShafiqEssani , there is a small but important note:

In Android, everything work fine with react-native link In iOS, there are some cases which may cause react-native-background-timer run unexpected. 1/ Enable the Capability -> Background Mode -> Audio... so that timer can run in background mode. 2/ If you are using Pod in iOS, avoid the react-native link because it will not work for iOS. You will receive the error said "Native module cannot be null". When you run pod install you will receive another annoying error. + If you used the react-native link already, remove the additional line that add react-native-background-timer from your Pod file and add it manually. + If you have not used react-native link - thanks god - you can start add react-native-background-timer manually.

You can follow this link: Linking Libraries - React native

Hi @ocetnik , this is a really really great library. If you see my comment is useful, please make it as a note at the bottom of README file. Thank you for your great library, you save my life many times

LuongTruong avatar Jan 15 '19 13:01 LuongTruong