Wizard’s 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

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

Functions

wtkMobilePNpush()

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

wtkMobilePNpush( 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

wtkMobilePush 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

wtkAndroidPush

uses
function

wtkApplePush

Return values
null

wtkAndroidPush()

With Google API_ACCESS_KEY this uses cURL to Push to Android

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

which is defined in wtkMobilePNpush

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

from curl

wtkApplePush()

This handles Apple Push functionality

wtkApplePush( 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