1 | export interface AppRatePreferences {
|
2 | /**
|
3 | * Custom BCP 47 language tag
|
4 | */
|
5 | useLanguage?: string;
|
6 | /**
|
7 | * Custom application title
|
8 | */
|
9 | displayAppName?: string;
|
10 | /**
|
11 | * Show dialog again when application version will be updated. Defaults to `true`
|
12 | */
|
13 | promptAgainForEachNewVersion?: boolean;
|
14 | /**
|
15 | * count of runs of application before dialog will be displayed. Defaults to `3`
|
16 | */
|
17 | usesUntilPrompt?: number;
|
18 | /**
|
19 | * leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
|
20 | */
|
21 | openStoreInApp?: boolean;
|
22 | /**
|
23 | * use custom view for rate dialog. Defaults to `false`
|
24 | */
|
25 | useCustomRateDialog?: boolean;
|
26 | /**
|
27 | * Custom locale object
|
28 | */
|
29 | customLocale?: any;
|
30 | /**
|
31 | * Callbacks for events
|
32 | */
|
33 | callbacks?: AppRateCallbacks;
|
34 | /**
|
35 | * App Store URLS
|
36 | */
|
37 | storeAppURL?: AppRateStoreAppUrls;
|
38 | }
|
39 | export interface AppRateCallbacks {
|
40 | /**
|
41 | * call back function. called when user clicked on rate-dialog buttons
|
42 | */
|
43 | onButtonClicked?: Function;
|
44 | /**
|
45 | * call back function. called when rate-dialog showing
|
46 | */
|
47 | onRateDialogShow?: Function;
|
48 | }
|
49 | export interface AppRateStoreAppUrls {
|
50 | /**
|
51 | * application id in AppStore
|
52 | */
|
53 | ios?: string;
|
54 | /**
|
55 | * application URL in GooglePlay
|
56 | */
|
57 | android?: string;
|
58 | /**
|
59 | * application URL in Windows Store
|
60 | */
|
61 | windows?: string;
|
62 | /**
|
63 | * application URL in AppWorld
|
64 | */
|
65 | blackberry?: string;
|
66 | /**
|
67 | * application URL in WindowsStore
|
68 | */
|
69 | windows8?: string;
|
70 | }
|
71 | /**
|
72 | * @name App Rate
|
73 | * @description
|
74 | * The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
|
75 | *
|
76 | * Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the [AppRate plugin docs](https://github.com/pushandplay/cordova-plugin-apprate).
|
77 | *
|
78 | * @usage
|
79 | * ```typescript
|
80 | * import { AppRate } from 'ionic-native';
|
81 | *
|
82 | * AppRate.preferences.storeAppURL = {
|
83 | * ios: '<my_app_id>',
|
84 | * android: 'market://details?id=<package_name>',
|
85 | * windows: 'ms-windows-store://review/?ProductId=<Store_ID>'
|
86 | * };
|
87 | *
|
88 | * AppRate.promptForRating(false);
|
89 | * ```
|
90 | *
|
91 | * @interfaces
|
92 | * AppRatePreferences
|
93 | * AppRateStoreAppUrls
|
94 | * AppRateCallbacks
|
95 | *
|
96 | */
|
97 | export declare class AppRate {
|
98 | /**
|
99 | * Configure various settings for the Rating View.
|
100 | * See table below for options
|
101 | */
|
102 | static preferences: AppRatePreferences;
|
103 | /**
|
104 | * Prompts the user for rating
|
105 | * @param {boolean} immediately Show the rating prompt immediately.
|
106 | */
|
107 | static promptForRating(immediately: boolean): void;
|
108 | }
|