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 working in background job (https://www.npmjs.com/package/react-native-background-job) #46

Open
shunnmugam opened this issue Aug 28, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@shunnmugam
Copy link

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 shunnmugam added the bug Something isn't working label Aug 28, 2020
@mrousavy
Copy link
Owner

  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

@shunnmugam
Copy link
Author

shunnmugam commented Aug 28, 2020

  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
Copy link
Author

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

@mrousavy
Copy link
Owner

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

@shunnmugam
Copy link
Author

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

@LakshmiMonisha
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants