Wizards Toolkit Documentation

Mobile.php

Functions for Push Notifications.

These have not been tested in years and need to be reviewed and verified.

All rights reserved.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Tags
author
Programming Labs
license
All rights reserved
version
2.0

Table of Contents

wzMobilePNpush()  : null
Pass in values and this function will trigger Android or Apple Push notification
wzAndroidPush()  : result
With Google API_ACCESS_KEY this uses cURL to Push to Android
wzApplePush()  : error
This handles Apple Push functionality

Functions

wzMobilePNpush()

Pass in values and this function will trigger Android or Apple Push notification

wzMobilePNpush( string  $fncUserId , string  $fncDeviceID [, string  $fncMsg = '' ] [, string  $fncPlatform = 'ios' ] [, string  $fncTitle = '' ] [, string  $fncSubTitle = '' ] [, string  $fncType = 'NULL' ] [, string  $fncUID = 'NULL' ] [, string  $fncTickerText = '' ] , string  $fncVibrate , string  $fncSound [, string  $fncLargeIcon = '' ] [, string  $fncSmallIcon = '' ] ) : null

wzMobilePush table needs to be found/created. Everything needs to be retested because this code is so old.

Parameters
$fncUserId : string
$fncDeviceID : string
$fncMsg : string = ''
$fncPlatform : string = 'ios'

defaults to 'ios'

$fncTitle : string = ''
$fncSubTitle : string = ''
$fncType : string = 'NULL'
$fncUID : string = 'NULL'
$fncTickerText : string = ''
$fncVibrate : string
$fncSound : string
$fncLargeIcon : string = ''

defaults to blank

$fncSmallIcon : string = ''

defaults to blank

Tags
uses
function

wzAndroidPush

uses
function

wzApplePush

Return values
null

wzAndroidPush()

With Google API_ACCESS_KEY this uses cURL to Push to Android

wzAndroidPush( array<string|int, mixed>  $fncAndroidArrays) : result
Parameters
$fncAndroidArrays : array<string|int, mixed>

which is defined in wzMobilePNpush

Tags
link
https://android.googleapis.com/gcm/send
Return values
result

from curl

wzApplePush()

This handles Apple Push functionality

wzApplePush( string  $fncDeviceID , string  $fncMessage , string  $fncSound [, string  $fncLargeIcon = '' ] , string  $fncBadge [, string  $fncCustom = '' ] ) : error

Must set PEM and setProviderCertificatePassphrase

Parameters
$fncDeviceID : string
$fncMessage : string
$fncSound : string
$fncLargeIcon : string = ''

defaults to blank

$fncBadge : string

to 0

$fncCustom : string = ''

to blank

Tags
global

sting $gloApnLog

Return values
error

or success from Apple

Search results