當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript core.CordovaInstance函數代碼示例

本文整理匯總了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;
 }
開發者ID:clintj42,項目名稱:ionic-native,代碼行數:13,代碼來源:index.ts

示例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;
 }
開發者ID:clintj42,項目名稱:ionic-native,代碼行數:13,代碼來源:index.ts

示例3: logError

 /**
  * This function log an error
  * @param code
  * @param message
  * @return {Promise<any>}
  */
 @CordovaInstance()
 logError(code: any, message: any): Promise<any> {
   return;
 }
開發者ID:clintj42,項目名稱:ionic-native,代碼行數:10,代碼來源:index.ts

示例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; }
開發者ID:sourbell,項目名稱:ionic-native,代碼行數:16,代碼來源:index.ts

示例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; }
開發者ID:sourbell,項目名稱:ionic-native,代碼行數:7,代碼來源:index.ts

示例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; }
開發者ID:sourbell,項目名稱:ionic-native,代碼行數:7,代碼來源:index.ts

示例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; };
開發者ID:sourbell,項目名稱:ionic-native,代碼行數:12,代碼來源:index.ts

示例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; }
開發者ID:sourbell,項目名稱:ionic-native,代碼行數:11,代碼來源:index.ts

示例9: clear

 /**
  * Clear all references from the storage.
  * @returns {Promise<any>}
  */
 @CordovaInstance({
   callbackOrder: 'reverse'
 })
 clear(): Promise<any> { return; }
開發者ID:clintj42,項目名稱:ionic-native,代碼行數:8,代碼來源:index.ts

示例10: addTransaction

 @CordovaInstance({
   sync: true
 })
 addTransaction(transaction: (tx: SQLiteTransaction) => void): void { }
開發者ID:gunsteaeuy,項目名稱:ionic-native,代碼行數:4,代碼來源:index.ts


注:本文中的@ionic-native/core.CordovaInstance函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。