mmazzarolo / react-native-beacons-android

A React-Native library for detecting beacons on Android
MIT License
74 stars 15 forks source link

No IBeacon detected #35

Open jonathanroze opened 7 years ago

jonathanroze commented 7 years ago

Hi Mmazzarolo, thank you, your plugin is good !

But i have a problem, when a launch my app, my ibeacon is detected one time every x secondes ! Sometimes, no ibeacon, some time i can see my ibeacon... I have tried on iPhone, and it works great!

Do you have an idea?

mmazzarolo commented 7 years ago

Hey @Clowning, unfortunately I'm not able to maintain anymore this repo :( #31 Anyway I recently merged a PR #34 that might help you.
I have not published it to npm though, but you can try if from the master branch of this repository (let me know if it works for you, so I can push it to npm).

jonathanroze commented 7 years ago

@mmazzarolo No you can't do that :o !! It's the only repo for ibeacons on Android :(( !

Ok so, i'ts definitively better, but not perfect ! Thank! I think you can push it to npm !

mmazzarolo commented 7 years ago

@Clowning I know, I tried to reach for help/maintainers but without success ;(
Thank you for the feedback though, I'll publish it to npm this evening!

P.S.: Just retweeted the help request again

jonathanroze commented 7 years ago

Yes .. It's weird ! Lot of people like Java aha !

Thank you :-) !

jonathanroze commented 7 years ago

@mmazzarolo But do you have an idea to keep my application alive when user kill it ? :/

mmazzarolo commented 7 years ago

If you mean when the app is removed even from the background... no. The only way to do something like this is creating an Android Service (from the Java code), I'm sorry. I started working on it in the past but had to give up because it was a time consuming task and I wasn't able to test it properly (no beacons available).

jonathanroze commented 7 years ago

Arf !

Mhh but it's possible to run my javascript code from a Android Service ? I've never code that !

Send me your address i offer you a beacon :D aha

MacKentoch commented 7 years ago

Sad news... Even iOS one seems like no more maintained.

I can take case of iOS version (I may since I need it) but android...

mmazzarolo commented 7 years ago

:(

MacKentoch commented 7 years ago

I didn't even try bridging with android.

If it doesn't require to know android dev.

I'm at this 0% pure android experienced :smile:.

MacKentoch commented 7 years ago

Hi @mmazzarolo,

As iOS version is no more maintained (react-native-ibeacon).

I've decided to handle it rather waiting a kind soul would evolve/fix it for us all (you may remember that at the end of the year 2016, RN introduced a bad breaking change in iOS, ex: #import RCTBrige is now #import <React/RCTBridge>.).

Here is my starting repository: react-native-ibeacons.

You did a great job on android so I wanna know if you are ok that I take your android version inside my repository?

I will try to merge iOS and Android versions so that javascript is the same (as much as possible).

In fact I hope I make it a complete RN module for iBeacons.

I don't have beacons but I have iPhones to create beacons, it is enough 👍 So I can deal beacons easily.

mmazzarolo commented 7 years ago

@MacKentoch of course man! Hope you'll bring back those repo to life!

MacKentoch commented 7 years ago

Nice!

So I'll start Android now for real.

MacKentoch commented 7 years ago

Glad to announce brand new: react-native-ibeacons.

it now (= v0.3.1) contains:

It starts supports for

@Clowning I'm sorry I can't ensure support for previous version of React Native (I had to deal with both iOS and Android and I needed to create it as fast as possible), but if it is ok feel free to give a feedback.

On Android, it fixes huge difficulties I encountered to range beacons with React Native 0.41.2.

jonathanroze commented 7 years ago

@MacKentoch I use the last version of React-Native :-) ! I can try your package during this week! I hope your documentation is good ! :p !

mmazzarolo commented 7 years ago

@MacKentoch , I'm obviously going to link your repo in the README but first... may I give you a suggestion :)?
The package name you're using, react-native-ibeacons, is a bit misleading in my opinion because you're targeting "beacons" and not "ibeacons" (which are the one implementing the Apple spec)... am I right?

MacKentoch commented 7 years ago

@mmazzarolo yes I agree with you that is not the best name... It works with nearly any beacons.

Names I wanted are already taken in npm. The best for me would have been:

I had to fast fix and merge iOS and Android in a first time.

I wanted to avoid long lasting names. But something like

I'm opened to suggestions.

mmazzarolo commented 7 years ago

Both react-native-beacons-manager and react-native-beacons-api sound way nicer imo 🍹

MacKentoch commented 7 years ago

here is the new one: react-native-beacons-manager.

mmazzarolo commented 7 years ago

@MacKentoch I linked your lib in the readme 👍

savaskalkan commented 4 years ago

Dude, I am trying to use this package(react-native-beacons-manager). But I can not make it run. There is no function like this. "requestWhenInUseAuthorization" I got error because of this.

Btw I am using react native 0.59.10 Also I used package for android. it has work but not find beacons.