We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Context: ReactNative App with a swift module
How to reproduce:
1)Call start first time
2)Call stop
3)Call start again.
It scan nothing without errors
what I expect:
To connect again to the device near me. How I can reset without close the app?
@objc func start(_ message: String){ DispatchQueue.main.async { NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: .main) { _ in self.active = true } NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: .main) { _ in self.active = false } }
//discoverer.startDiscovery() print("PARTITO") print(self.Messages) //advertiser.startAdvertising(using: message.data(using: .utf8)!) payloadDataSupplier = MySupplier(message: message) self.sensor = SensorArray(payloadDataSupplier!) self.sensor?.add(delegate: self) self.sensor?.start() locationManager.pausesLocationUpdatesAutomatically = false locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers locationManager.distanceFilter = 3000.0 locationManager.showsBackgroundLocationIndicator = true; if #available(iOS 9.0, *) { locationManager.allowsBackgroundLocationUpdates = true } else { // not needed on earlier versions } // start updating location at beginning just to give us unlimited background running time self.locationManager.startUpdatingLocation() //periodicallySendScreenOnNotifications(message:message) extendBackgroundRunningTime() self.sendEvent(withName: EventType.onActivityStart.rawValue, body: "Success")
}
@objc(stop) func stop(){ self.Messages = Array(); self.locationManager.stopUpdatingLocation(); self.threadShouldExit = true self.active = false UIApplication.shared.endBackgroundTask(self.backgroundTask) //advertiser.stopAdvertising() self.sensor?.stop() payloadDataSupplier = MySupplier(message: "") self.sensor = SensorArray(payloadDataSupplier!) //discoverer.stopDiscovery() self.sendEvent(withName: EventType.onActivityStop.rawValue, body: "Success") }
The text was updated successfully, but these errors were encountered:
Same problem
Sorry, something went wrong.
no activity?
When I restart the sensor I have this error
No branches or pull requests
Context: ReactNative App with a swift module
How to reproduce:
1)Call start first time
2)Call stop
3)Call start again.
It scan nothing without errors
what I expect:
To connect again to the device near me. How I can reset without close the app?
@objc
func start(_ message: String){
DispatchQueue.main.async {
NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: .main) { _ in
self.active = true
}
NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: .main) { _ in
self.active = false
}
}
}
@objc(stop)
func stop(){
self.Messages = Array();
self.locationManager.stopUpdatingLocation();
self.threadShouldExit = true
self.active = false
UIApplication.shared.endBackgroundTask(self.backgroundTask)
//advertiser.stopAdvertising()
self.sensor?.stop()
payloadDataSupplier = MySupplier(message: "")
self.sensor = SensorArray(payloadDataSupplier!)
//discoverer.stopDiscovery()
self.sendEvent(withName: EventType.onActivityStop.rawValue, body: "Success")
}
The text was updated successfully, but these errors were encountered: