-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
If you have a delegate method that is fired every X seconds in the background when the device is locked. The delegate method is fired but the event is not. The following code
This log message Is triggered when the device is locked and screen is inactive.
NSLog(@"userUUID found %@", userUUID);
This event is triggered if the device is locked but the screen needs to be active.
[self.bridge.eventDispatcher sendDeviceEventWithName:@"nearByUserFound" body:@{@"userUUID":userUUID}];
//
// ProximityManager.m
// Proximity
//
// Created by Adam Bulmer on 07/05/2015.
// Copyright (c) 2015 Adam Bulmer All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ProximityManager.h"
@implementation ProximityManager
@synthesize bridge = _bridge;
// MARK: React Native Bridge
RCT_EXPORT_MODULE()
RCT_EXPORT_METHOD(startAdvertising:(NSString *)appUUID
userUUID:(NSString*)userUUID) {
self.proximity = [[Proximity alloc] initWithAppUUID:appUUID userUUID:userUUID delegate:self];
}
// MARK: ProximityDelegate Callbacks.
- (void)nearbyUserFound:(NSString *)userUUID {
NSLog(@"userUUID found %@", userUUID);
[self.bridge.eventDispatcher sendDeviceEventWithName:@"nearByUserFound" body:@{@"userUUID":userUUID}];
}
@end
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.