-
Notifications
You must be signed in to change notification settings - Fork 15
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
Any luck with Eddystone? #22
Comments
Hello there! #8 is related |
Regarding the background service... the last time I took a look at it it didn't seem doable on React-Native... but I would be happy to be proved wrong. |
Hi, I really appreciate your prompt response. I just followed your instruction and here is some of the log content,
D/BeaconsAndroidModule( 6382): BeaconsAndroidModule - started It's always null. But not sure why isn't working for EddyStone. I switched the Primary Packet Type to default(iBeacon) in my Estimote and it's working awesome. Here is the log cat content for iBeacon D/BeaconsAndroidModule( 9029): BeaconsAndroidModule - started Thanks again for helping me out. |
For the background service, I went through some forums and it seems, we can do it on React Native. Here is the stackoverflow link where people discussing on Background intent service, http://stackoverflow.com/questions/34687473/background-service-on-react-native-android Also, the below listed repo have this background service but it's been commented now. @devfd mentioned that he would release the new one with background service that even work when the android app is killed from app switcher. Here is the link to his repo, https://github.com/devfd/react-native-workers Here is the background service related files that are commented by author for now, https://github.com/devfd/react-native-workers/blob/master/android/src/main/java/co/apptailor/Worker/WorkerModule.java (find the startService() function. Also, from the below article, it seems it's possible to use existing android native module, https://shift.infinite.red/shopping-external-libs-in-react-native-cfbc0c6e25cf#.fnrz9qh57 In that case, if we could integrate this, that would solve the back ground problem. https://android-arsenal.com/details/1/4179 Of course, I could be wrong but I thought of sharing what I came up with in my findings. I also have to be honest with you that I never tried JAVA before. |
Thank you so much @sudharsan1988, you've been incredibly helpful! Regarding the Eddystone: you did everything right (you followed this, am I right?), but it still seems that the AltBeacons Library (the one I implemented in this module) is not able to detect the Eddystone beacons... that's weird and unfortunately without an Eddystone beacon it's not easy for me debugging this issue. Regarding the background service: thanks again, it seems doable now 👍 , the only thing I need to investigate further is understanding if I can keep the service in the background even when the app is not in memory (aka when you swipe it from the recent apps). If it was a standard Android app it would be easy, but I don't know if being tied to JS can be a problem... |
@mmazzarolo , really thanks for updating the readme. I'm sorry that I couldn't help you with Java part but whenever you need, I can do testing with the Eddystone(Estimote) that I have got. Also, for the background service, could you take a look at this library as it's using the background service even when the app is killed. I have tested this myself and that works fine. I can get the push notifications even after I killed the app from the app switcher. https://github.com/zo0r/react-native-push-notification I'm sure, it can help us to understand how to integrate the Background service. I'm also trying to find out if there is any open source background service library is already out there for us to use. I will keep you posted. |
Hi, this article may be helpful for background service. https://dzone.com/articles/how-to-develop-a-simple-step-counter-app-on-reactn I tried their example app on Android Emulator but no luck. There are some issues in the Example app. Here is their github repo, https://github.com/Singree/react-native-example-app |
I'll take a look on this. |
@sudharsan1988 sorry, I'm having two busy week at work, I'll take a look at all the links you posted as soon as you can. Thank you guys! |
@mmazzarolo , no worries! I will keep digging for the background service and keep you posted :) @levint , thank you for helping us out. I have a Eddystone beacon(Estimote) with me. I can help you with any testing you want. |
@mmazzarolo I have an Estimote beacon but with a firmware update now supports Eddystone! |
It's not yet working on mine, as of this moment. I also tried installing Beacon Toy on my mobile phone and set it to broadcast as Eddystone-URL, but it still cannot be detected by the react-native app. Edit: |
@levint thank you for your support. |
UPDATE: I made it to work using an Eddystone-capable Beacon. I'll post my findings later. I made adjustments in both the Javascript and Native code. Using Alt Beacon 2.9 |
Hi @mmazzarolo, do you want me to submit a PR or would you like to do it on your own as per my findings? Technically, adding a BeaconParser should be done before the Consumer (in the library's case, the ReactContextBaseJavaModule subclass) is binded to the BeaconManager instance via (mBeaconManager.bind(this)). My proposed solution would be to check if the consumer is already bound to the manager instance before ranging and/or monitoring is done, probably on the start of startRanging/startMonitoring methods. If not yet bound, then we should bind it. (Instead of doing it in the constructor). It is also possible to do it on the react-native side :) |
@levint that's awesome! Thank you again! |
@mmazzarolo Okay, will do before this week ends :) |
@levint , awesome news! Is it possible for you to share your forked version of repo, I am very excited to test it :) |
@levint, just curious to know whether you have got any chance to PR the changes regarding the Eddystone? |
Hey @levint, sorry to bother you... do you have any info regarding Eddystone? Thanks! |
@levint can u send ur PR regarding eddystone Thanks |
Hi, |
Hi, just wanted to check back to see whether you got a chance to look into the Eddystone support for this module. Man, this library is awesome :) If we could add Eddystone & Background service, that would cover most of the things.
The text was updated successfully, but these errors were encountered: