本文整理匯總了TypeScript中@ionic-native/core.CordovaInstance函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript CordovaInstance函數的具體用法?TypeScript CordovaInstance怎麽用?TypeScript CordovaInstance使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了CordovaInstance函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: logEvent
/**
* This function set the Event
* @param eventName {string} Name of the event
* @param [params] {Object} Optional params
* @return {Promise<any>} Returns a promise that resolves when event is sent
*/
@CordovaInstance({
successIndex: 2,
errorIndex: 3
})
logEvent(eventName: string, params?: any): Promise<any> {
return;
}
示例2: endTimedEvent
/**
* Complete a timed event
* @param eventName {string} Name of the event
* @param [params] {Object} Optional params
* @return {Promise<any>} Returns a promise that resolves when timed event is ended tracking
*/
@CordovaInstance({
successIndex: 2,
errorIndex: 3
})
endTimedEvent(eventName: string, params?: Object): Promise<any> {
return;
}
示例3: logError
/**
* This function log an error
* @param code
* @param message
* @return {Promise<any>}
*/
@CordovaInstance()
logError(code: any, message: any): Promise<any> {
return;
}
示例4: acquireTokenAsync
/**
* Acquires token using interactive flow. It always shows UI and skips token from cache.
*
* @param {String} resourceUrl Resource identifier
* @param {String} clientId Client (application) identifier
* @param {String} redirectUrl Redirect url for this application
* @param {String} userId User identifier (optional)
* @param {String} extraQueryParameters
* Extra query parameters (optional)
* Parameters should be escaped before passing to this method (e.g. using 'encodeURI()')
* @returns {Promise} Promise either fulfilled with AuthenticationResult object or rejected with error
*/
@CordovaInstance({
otherPromise: true
})
acquireTokenAsync(resourceUrl: string, clientId: string, redirectUrl: string, userId?: string, extraQueryParameters?: any): Promise<AuthenticationResult> { return; }
示例5: unsubscribe
/**
* The unsubscribe method is used when the application no longer wants to receive push notifications from a specific topic but continue to receive other push messages.
* @param topic {string} Topic to unsubscribe from.
* @return {Promise<any>}
*/
@CordovaInstance()
unsubscribe(topic: string): Promise<any> { return; }
示例6: finish
/**
* iOS only
* Tells the OS that you are done processing a background push notification.
* successHandler gets called when background push processing is successfully completed.
*/
@CordovaInstance()
finish(): Promise<any> { return; }
示例7: setApplicationIconBadgeNumber
/**
* Set the badge count visible when the app is not running
*
* The count is an integer indicating what number should show up in the badge.
* Passing 0 will clear the badge.
* Each notification event contains a data.count value which can be used to set the badge to correct number.
* @param count
*/
@CordovaInstance({
callbackOrder: 'reverse'
})
setApplicationIconBadgeNumber(count?: number): Promise<any> { return; };
示例8: on
/**
* Adds an event listener
* @param event {string}
* @return {Observable<EventResponse>}
*/
@CordovaInstance({
observable: true,
clearFunction: 'off',
clearWithArgs: true
})
on(event: PushEvent): Observable<EventResponse> { return; }
示例9: clear
/**
* Clear all references from the storage.
* @returns {Promise<any>}
*/
@CordovaInstance({
callbackOrder: 'reverse'
})
clear(): Promise<any> { return; }
示例10: addTransaction
@CordovaInstance({
sync: true
})
addTransaction(transaction: (tx: SQLiteTransaction) => void): void { }