Home › Forums › Ask the Flomies › Not working across viewcontrollers
Tagged: flomio bzr
-
AuthorPosts
-
March 19, 2018 at 12:45 am #62631
Hi,
I have a FloJack BZR which I’m currently testing it with iPhone 5s, iOS 10.
My app has view hierarchy as such: HomeView > DetailViewScanning of the NFC tag will occur in DetailView.
So, what I did is, I init the FmSessionManager once user navigated to the DetailView. Everything is working fine, I am able to scan. Then I use stopReaders whenever user navigate back to HomeView in order to stop scanning.
The issue occurs after this, whenever I navigate again to DetailView, the scanning stop workings. Totally no log from the device.
It will only works again after I kill the app entirely and re-launch it again.
Thank you.
March 19, 2018 at 6:21 am #62632Hi Mah, sorry for the issues. First thing I would recommend is that you upgrade to the latest iOS release (11.2.6). We are shorthanded on staff so can’t afford to support anything but the latest OS versions. Next I would recommend that you install the Flomio Test app. Making sure your hardware is behaving properly will make sure we can focus our effort. Lastly you should make sure you are using the latest Flomio SDK v2.3.
Once all those things checkout, be ready with a prepared sample of your code so that we can verify you’re configuring the SDK correctly.
best,
Richard- This reply was modified 6 years ago by Scott.
March 19, 2018 at 6:26 am #62633Hi Richard, thanks for helping.
I actually have another iPhone 5s with iOS 11.2.5, however, when I plugged in the FloJack BZR, no beep or whatsoever from the reader.
I’m using Flomio SDK v2.3.
I actually can use the reader on my happy-path use case. Everything works and scans well on the first usage. But when I close a view and re-open the view again within the same app-session (without killing app), then it won’t work anymore.
March 19, 2018 at 6:53 am #62634Yes, I can acknowledge that for the audio jack readers we have had issues with backgrounding and foregrounding apps across OS versions. This is because the audio interfaces on mobile are constantly changing so it’s a moving target. Have you considered our FloBLE line of readers? These are much more immune to OS changes since they follow the more standardized Bluetooth standard.
Either way we will do our best to support your needs. I would first update your other iPhone5s to iOS 11.2.6 and download the Flomio Test app onto it. If you don’t see that the BZR initializes with Flomio Test then your phone volume might not be at max on that phone.
best,
RichardMarch 19, 2018 at 9:32 pm #62635I have actually ordered the FloBLE Plus reader last week and awaiting for it’s arrival. Meanwhile, I’m building an app to further enhance my features using FloJack.
Anyway, let’s look into the code where I can reproduce this issue? Because I might afraid even if I’m having the FloBLE Plus reader, the same thing will happen. So, maybe you can try to reproduce at your side to see whether this happens with FloBLE Plus reader?
My issue happens when I run the FmSessionManager.init for 2 times in the same session, then the reader stop working.
1) Let’s say I have the below code running in my viewDidLoad() method for the first time in my DetailView.
flomioMW = FmSessionManager.init(configuration: defaultConfiguration) flomioMW.delegate = self
Everything works fine, reader is scanning and found tag.
2) Then I click back and navigated back to my HomeView. Before going back, I executed the code below to stop the reader:
flomioMW.stopReaders()
3) Then, I navigated to my DetailView again, so it will run the viewDidLoad again and thus running the code again that I written in Step 1. Then, from there onwards, the reader stop working. Not working also even I have use flomioMW.startReaders().
____________________________________________________
To further confirm my findings, I created another button that run the below code whenever it is clicked:
flomioMW = FmSessionManager.init(configuration: defaultConfiguration) flomioMW.delegate = self flomioMW.startReaders()
I make sure the reader is scanning successfully first on the first run, then I use flomioMW.stopReaders(). Then I clicked the above button, then the reader won’t start.
In summary, to reproduce my issue:
a)flomioMW = FmSessionManager.init(configuration: defaultConfiguration) flomioMW.delegate = self
b)
flomioMW.stopReaders()
c)
flomioMW = FmSessionManager.init(configuration: defaultConfiguration) flomioMW.delegate = self flomioMW.startReaders()
April 9, 2018 at 7:21 am #62736Hi Mah,
You should not call
FmSessionManager.init
twice. It should be called once and then use startReaders, sleepReaders and stopReaders to control the readers.Scott
August 8, 2018 at 12:44 am #63792 -
AuthorPosts
You must be logged in to reply to this topic.