Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleiOS [Objective-C]
Code Block
// Disable & Enable
[[Appoxee shared] disablePushNotifications:booleanArgument withCompletionHandler:^(NSError *appoxeeError, id data) {

	if (!appoxeeError) {

		// operation was successful.
	}
}];

// State (enabled or disabled)
[[Appoxee shared] isPushEnabled:^(NSError *appoxeeError, id data) {

	if (!appoxeeError) {

		BOOL state = [(NSNumber *)data boolValue];
	}
}];
Expand
titleiOS [Swift]
Code Block
Appoxee.shared()?.disablePushNotifications(booleanArgument, withCompletionHandler: { (appoxeeError, data) in
    
    if appoxeeError == nil {
        
        // Operation was successful.
    }
})
 
Appoxee.shared()?.isPushEnabled({ (appoxeeError, data) in
    
    if appoxeeError == nil {
        
        let isEnabled = data as? NSNumber
    }
})
Expand
titleAndroid [Java]
Code Block
//Sets whether push notification are to be sent to the device
public RequestStatus setPushEnabled(boolean isPushEnabled) 

Appoxee.instance().setPushEnabled(true);

...