react-native-google-nearby-messages icon indicating copy to clipboard operation
react-native-google-nearby-messages copied to clipboard

[BUG] Not working in background job (https://www.npmjs.com/package/react-native-background-job)

Open shunnmugam opened this issue 3 years ago • 6 comments

Bug

I have read the Troubleshooting page: Yes

Describe the bug I'm using this library with https://www.npmjs.com/package/react-native-background-job, if app opens everting is fine, while background mode, it's not able to connect

To Reproduce Steps to reproduce the behavior:

  1. install react-native-background-job
  2. schedule a job
  3. call connect method
  4. See error
"react": 16.12,
"react-native": 0.61.5,
"react-native-google-nearby-messages": 1.0.20

shunnmugam avatar Aug 28 '20 09:08 shunnmugam

  1. Which error do you see?
  2. Background mode is not officially supported, some small changes might have to be made to this library's native code for this to work. I think there's a separate issue for this

mrousavy avatar Aug 28 '20 09:08 mrousavy

  1. I'm not able to see any errors, it's not connected try { await connect({ apiKey: GOOGLE_API_KEY }); -->stopped execution here console.log("after connect") --> it's not going to here } catch(e) { console.log("error",e) --> it's not going to here also }

2.Can you share how to run in background mode

shunnmugam avatar Aug 28 '20 10:08 shunnmugam

i found some error while debuging kotlin code

Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

shunnmugam avatar Aug 28 '20 11:08 shunnmugam

I see. We need a background-mode context which will be used for the Nearby API

mrousavy avatar Aug 28 '20 11:08 mrousavy

@mrousavy , how much time will take to fix this?

shunnmugam avatar Aug 31 '20 08:08 shunnmugam

@mrousavy , By when the bug would be fixed or else could you suggest any alternative?

LakshmiMonisha avatar Oct 01 '20 11:10 LakshmiMonisha