From version 1.1 >
edited by Admin
on 2019/12/30 10:44
To version < 6.1 >
edited by Developer
on 2021/04/23 14:01
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.spicyadmin
1 +XWiki.developer
Content
... ... @@ -1,0 +1,718 @@
1 +{{box cssClass="floatinginfobox" title="**Page Contents**"}}
2 +{{toc/}}
3 +{{/box}}
4 +
5 += 1. Overview =
6 +
7 +MobigateSDK is a tool for gathering users phone data and event tracking. We have developed an SDK that is highly robust, secure, lightweight and very simple to embed.
8 +You can track installs, updates and sessions and also track additional in-app events beyond app installs .
9 +
10 +The MobigateSDK is compatible with Android OS version 4.0 and above.
11 +
12 +Chapters 2 and 3 are MANDATORY to implement BASIC SDK integration. Tracking in-app events chapter is HIGHLY RECOMMENDED to implement. The rest of the described features are OPTIONAL to implement, although some of them may be necessary for you, depending on your app's business logic.
13 +
14 += 2. Adding library to project =
15 +
16 +**Click [[here>>https://github.com/mobigatesdk/SamplesWithMobigateSDK]] to download sample app integration source code.**
17 +
18 +== Step 1 ==
19 +
20 +To add the library into Android Studio with Gradle build system, add to your top-level build.gradle file:
21 +
22 +{{code language="groovy"}}
23 +repositories {
24 + maven {
25 + url "https://repository.spicymobile.pl/repository/spicymobilerelease/"
26 + }
27 + ...
28 +}
29 +{{/code}}
30 +
31 +== Step 2 ==
32 +
33 +Then add the implementation dependency to your module build.gradle file (latest version is 1.0.18, you can fin the repository [[here>>https://repository.spicymobile.pl/#browse/pl.spicymobile.mobigate.sdk]]):
34 +
35 +{{code language="groovy"}}
36 +dependencies {
37 + implementation 'pl.spicymobile.mobigate.sdk:mobigate-sdk:1.x'
38 + ...
39 +}
40 +{{/code}}
41 +
42 +
43 +
44 +== WorkManager known issues ==
45 +
46 +In order to minimise any possibility of impacting behavior of your application Mobigate SDK does the majority of its work in a second process. There are some known issuse (described [[here>>https://issuetracker.google.com/issues/160625831]]) regarding performance of WorkManager in context of multiprocess applications. In ofred to avoid those issues please use androidx.work:work-multiprocess:2.5.0 or higher as your WorkManager dependency.
47 +
48 += 3. SDK Initialization =
49 +
50 +In order to obtain "API_KEY", contact us by going to the "Contact" tab.
51 +
52 +To initialize the SDK, add the following code in your Application onCreate() function:
53 +
54 +{{code language="java"}}
55 +public class MyApplication extends Application {
56 + @Override
57 + public void onCreate() {
58 + super.onCreate();
59 + /*minimum library configuration*/
60 + SDK sdk = new MobigateSDK.Builder(getApplicationContext(),"Api_key").build();
61 + /*start data gather*/
62 + sdk.startService();
63 + }
64 +}
65 +{{/code}}
66 +
67 +
68 +{{{
69 + }}}
70 +
71 += 4. Tracking in-app events =
72 +
73 +== 4.1 Overview ==
74 +
75 +In-App Events provide insight on what is happening in your app. It is recommended to take the time and define the events you would like to measure.
76 +
77 +An event consists of two fields that you (% style="display:none" %) (%%)can use to describe a user's interaction with your app content:
78 +
79 +(% class="table-bordered" %)
80 +|(% style="background-color:powderblue; width:200px" %)**Field name**|(% style="background-color:powderblue; width:200px" %)**Type**|(% style="background-color:powderblue; width:200px" %)**Required**|(% style="background-color:powderblue; width:200px" %)**Description**
81 +|(% style="width:200px" %)Category|(% style="width:200px" %)String/EventCategory|(% style="width:200px" %)yes|(% style="width:200px" %)Event category
82 +|(% style="width:200px" %)Parameter|(% style="width:200px" %)String/EventParameter|(% style="width:200px" %)no|(% style="width:200px" %)Event parameter.
83 +There can be more than one
84 +
85 +You can use any event category or parameter string of your choice. However, our SDK contains recommended event categories and parameters via enumerations (see [[Event categories>>doc:||anchor="H4.3Eventcategories"]] and [[Event parameters>>doc:||anchor="H4.4Eventparameters"]]).
86 +
87 +== 4.2 Implementation ==
88 +
89 +Tracking in-app events is performed by two methods:
90 +
91 +{{code language="java"}}
92 +MobigateSDK.get().trackEvent(new Category.Builder(EventCategory.ADD_PAYMENT_INFO)
93 + .setParameter(EventParameter.CITY,"warszawa")
94 + .setParameter(EventParameter.CURRENCY, "PLN")
95 + .setParameter("UserChoiceParameterName", 12345)
96 + .build())
97 +MobigateSDK.get().trackAppInstall(long timestamp) //with event timestamp parameter
98 +{{/code}}
99 +
100 +== 4.3 Event categories ==
101 +
102 +The following section describes the recommended structure of each event category. In-app events categories are defined as part of the EventCategory enumeration class.
103 +
104 +{{showhide id="1" showmessage="LEVEL_ACCOMPLISHED" hidemessage="LEVEL_ACCOMPLISHED" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: 0px"}}
105 +
106 +\\**Description:** Track accomplished game level achievement
107 +**Event category:** EventCategory.LEVEL_ACCOMPLISHED
108 +**Recommended parameters:** LEVEL, SCORE
109 +{{/showhide}}
110 +
111 +{{showhide id="2" showmessage="ADD_PAYMENT_INFO" hidemessage="ADD_PAYMENT_INFO" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
112 +
113 +\\**Description:** Track payment info
114 +**Event category:** EventCategory.ADD_PAYMENT_INFO
115 +**Recommended parameters:** SUCCESS
116 +{{/showhide}}
117 +
118 +{{showhide id="3" showmessage="ADD_TO_BASKET" hidemessage="ADD_TO_BASKET" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
119 +
120 +\\**Description:** Track add item to basket
121 +**Event category:** EventCategory.ADD_TO_BASKET
122 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY
123 +{{/showhide}}
124 +
125 +{{showhide id="4" showmessage="REMOVED_FROM_BASKET" hidemessage="REMOVED_FROM_BASKET" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
126 +
127 +\\**Description:** Track removed item from basket
128 +**Event category:** EventCategory.REMOVED_FROM_BASKET
129 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY
130 +{{/showhide}}
131 +
132 +{{showhide id="5" showmessage="ADD_TO_WISH_LIST" hidemessage="ADD_TO_WISH_LIST" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
133 +
134 +\\**Description:** Track add item to wish list
135 +**Event category:** EventCategory.ADD_TO_WISH_LIST
136 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY
137 +{{/showhide}}
138 +
139 +{{showhide id="6" showmessage="REGISTRATION" hidemessage="REGISTRATION" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
140 +
141 +\\**Description:** Track registration
142 +**Event category:** EventCategory.REGISTRATION
143 +**Recommended parameters:** REGISTRATION_METHOD
144 +{{/showhide}}
145 +
146 +{{showhide id="7" showmessage="TUTORIAL_COMPLETION" hidemessage="TUTORIAL_COMPLETION" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
147 +
148 +\\**Description:** Track tutorial completion
149 +**Event category:** EventCategory.TUTORIAL_COMPLETION
150 +**Recommended parameters:** SUCCESS, CONTENT, CONTENT_ID
151 +{{/showhide}}
152 +
153 +{{showhide id="8" showmessage="TRIGGER_CHECKOUT" hidemessage="TRIGGER_CHECKOUT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
154 +
155 +\\**Description:** Track triggered checkout
156 +**Event category:** EventCategory.TRIGGER_CHECKOUT
157 +**Recommended parameters:** PROCE, CONTENT_TYPE, CONTENT_ID, CONTENT, QUANTITY, PAYMENT_INFO_AVAILABLE, CURRENCY
158 +{{/showhide}}
159 +
160 +{{showhide id="9" showmessage="PURCHASE" hidemessage="PURCHASE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
161 +
162 +\\**Description:** Track purchased item
163 +**Event category:** EventCategory.PURCHASE
164 +**Recommended parameters:** REVENUE, CONTENT_TYPE, CONTENT_ID, CONTENT, PRICE, QUANTITY, CURRENCY, ORDER_ID
165 +{{/showhide}}
166 +
167 +{{showhide id="10" showmessage="SUBSCRIBE" hidemessage="SUBSCRIBE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
168 +
169 +\\**Description:** Track subscription purchase
170 +**Event category:** EventCategory.SUBSCRIBE
171 +**Recommended parameters:** REVENUE, CURRENCY
172 +{{/showhide}}
173 +
174 +{{showhide id="11" showmessage="BEGIN_TRIAL" hidemessage="BEGIN_TRIAL" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
175 +
176 +\\**Description:** Track begin trail of product
177 +**Event category:** EventCategory.BEGIN_TRIAL
178 +**Recommended parameters:** PRICE, CURRENCY
179 +{{/showhide}}
180 +
181 +{{showhide id="12" showmessage="RATE" hidemessage="RATE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
182 +
183 +\\**Description:** Track app/item rate
184 +**Event category:** EventCategory.RATE
185 +**Recommended parameters:** RATING_VALUE, CONTENT_TYPE, CONTENT_ID, CONTENT, MAX_RATING_VALUE
186 +{{/showhide}}
187 +
188 +{{showhide id="13" showmessage="SEARCH" hidemessage="SEARCH" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
189 +\\**Description:** Track search event
190 +**Event category:** EventCategory.SEARCH
191 +**Recommended parameters:** CONTENT_TYPE, SEARCH_STRING, SUCCESS
192 +{{/showhide}}
193 +
194 +{{showhide id="14" showmessage="USED_CREDIT" hidemessage="USED_CREDIT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
195 +\\**Description:** Track use of credit
196 +**Event category:** EventCategory.USED_CREDIT
197 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT
198 +{{/showhide}}
199 +
200 +{{showhide id="15" showmessage="UNLOCKED_ACHIEVEMENT" hidemessage="UNLOCKED_ACHIEVEMENT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
201 +\\**Description:** Track achievement unlock
202 +**Event category:** EventCategory.UNLOCKED_ACHIEVEMENT
203 +**Recommended parameters:** DESCRIPTION
204 +{{/showhide}}
205 +
206 +{{showhide id="16" showmessage="VIEW_CONTENT" hidemessage="VIEW_CONTENT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
207 +\\**Description:** Track content view event
208 +**Event category:** EventCategory.VIEW_CONTENT
209 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY
210 +{{/showhide}}
211 +
212 +{{showhide id="17" showmessage="VIEW_LIST" hidemessage="VIEW_LIST" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
213 +\\**Description:** Track list event
214 +**Event category:** EventCategory.VIEW_LIST
215 +**Recommended parameters:** CONTENT_TYPE, CONTENT_LIST
216 +{{/showhide}}
217 +
218 +{{showhide id="18" showmessage="CLICK_AD" hidemessage="CLICK_AD" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
219 +\\**Description:** Track ad click
220 +**Event category:** EventCategory.CLICK_AD
221 +**Recommended parameters:** CONTENT_TYPE, CONTENT_ID
222 +{{/showhide}}
223 +
224 +{{showhide id="19" showmessage="VIEW_AD" hidemessage="VIEW_AD" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
225 +\\**Description:** Track view ad
226 +**Event category:** EventCategory.VIEW_AD
227 +**Recommended parameters:** CONTENT_TYPE, CONTENT_ID
228 +{{/showhide}}
229 +
230 +{{showhide id="20" showmessage="EVENT_BOOKING" hidemessage="EVENT_BOOKING" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
231 +\\**Description:** Track booking event
232 +**Event category:** EventCategory.EVENT_BOOKING
233 +**Recommended parameters:** REVENUE, DESTINATION_A, DESTINATION_B, CLASS, DESCRIPTION, CUSTOMER_USER_ID, CONTENT_TYPE, CONTENT_ID, DATE_A, DATE_B
234 +{{/showhide}}
235 +
236 +{{showhide id="21" showmessage="SHARE" hidemessage="SHARE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
237 +\\**Description:** Track share event
238 +**Event category:** EventCategory.SHARE
239 +**Recommended parameters:** DESCRIPTION
240 +{{/showhide}}
241 +
242 +{{showhide id="22" showmessage="INVITE" hidemessage="INVITE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
243 +\\**Description:** Track social invite event
244 +**Event category:** EventCategory.INVITE
245 +**Recommended parameters:** NONE
246 +{{/showhide}}
247 +
248 +{{showhide id="23" showmessage="LOGIN" hidemessage="LOGIN" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
249 +\\**Description:** Track user login event
250 +**Event category:** EventCategory.LOGIN
251 +**Recommended parameters:** NONE
252 +{{/showhide}}
253 +
254 +{{showhide id="24" showmessage="EVENT_RETURN" hidemessage="EVENT_RETURN" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
255 +\\**Description:** Track re engagement event
256 +**Event category:** EventCategory.EVENT_RETURN
257 +**Recommended parameters:** NONE
258 +{{/showhide}}
259 +
260 +{{showhide id="25" showmessage="OPENED_PUSH_NOTIFICATION" hidemessage="OPENED_PUSH_NOTIFICATION" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
261 +\\**Description:** Track user opened push notification
262 +**Event category:** EventCategory.OPENED_PUSH_NOTIFICATION
263 +**Recommended parameters:** NONE
264 +{{/showhide}}
265 +
266 +{{showhide id="26" showmessage="UPDATE" hidemessage="UPDATE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
267 +\\**Description:** Track update event
268 +**Event category:** EventCategory.UPDATE
269 +**Recommended parameters:** CONTENT_ID
270 +{{/showhide}}
271 +
272 +
273 +== 4.4 Event parameters ==
274 +
275 +In addition each category that is passed with event may have optional parameters defined as part of the EventParameter enum class, or custom defined as String. Below is a list of recommended parameters.
276 +
277 +(% class="table-bordered" %)
278 +|(% style="background-color:powderblue; width:200px" %)**Parameter enum**|(% style="background-color:powderblue; width:200px" %)**Recommended value**
279 +|(% style="width:200px" %)EventParameter.REVENUE|(% style="width:200px" %)FLoat
280 +|(% style="width:200px" %)EventParameter.PRICE|(% style="width:200px" %)Float
281 +|(% style="width:200px" %)EventParameter.LEVEL|(% style="width:200px" %)Integer
282 +|(% style="width:200px" %)EventParameter.SUCCESS|(% style="width:200px" %)Boolean
283 +|(% style="width:200px" %)EventParameter.CONTENT_TYPE|(% style="width:200px" %)String
284 +|(% style="width:200px" %)EventParameter.CONTENT_LIST|(% style="width:200px" %)Array of strings
285 +|(% style="width:200px" %)EventParameter.CONTENT_ID|(% style="width:200px" %)String
286 +|(% style="width:200px" %)EventParameter.CURRENCY|(% style="width:200px" %)String
287 +|(% style="width:200px" %)EventParameter.REGISTRATION_METHOD|(% style="width:200px" %)String
288 +|(% style="width:200px" %)EventParameter.QUANTITY|(% style="width:200px" %)Integer
289 +|(% style="width:200px" %)EventParameter.PAYMENT_INFO_AVAILABLE|(% style="width:200px" %)Boolean
290 +|(% style="width:200px" %)EventParameter.RATING_VALUE|(% style="width:200px" %)Float
291 +|(% style="width:200px" %)EventParameter.MAX_RATING_VALUE|(% style="width:200px" %)Float
292 +|(% style="width:200px" %)EventParameter.SEARCH_STRING|(% style="width:200px" %)String
293 +|(% style="width:200px" %)EventParameter.DESCRIPTION|(% style="width:200px" %)String
294 +|(% style="width:200px" %)EventParameter.SCORE|(% style="width:200px" %)Integer
295 +|(% style="width:200px" %)EventParameter.DESTINATION_A|(% style="width:200px" %)String
296 +|(% style="width:200px" %)EventParameter.DESTINATION_B|(% style="width:200px" %)String
297 +|(% style="width:200px" %)EventParameter.CLASS|(% style="width:200px" %)String
298 +|(% style="width:200px" %)EventParameter.DATE_A|(% style="width:200px" %)String
299 +|(% style="width:200px" %)EventParameter.DATE_B|(% style="width:200px" %)String
300 +|(% style="width:200px" %)EventParameter.EVENT_START|(% style="width:200px" %)Unixtime
301 +|(% style="width:200px" %)EventParameter.EVENT_END|(% style="width:200px" %)Unixtime
302 +|(% style="width:200px" %)EventParameter.LATITUDE|(% style="width:200px" %)Double
303 +|(% style="width:200px" %)EventParameter.LONGITUDE|(% style="width:200px" %)Double
304 +|(% style="width:200px" %)EventParameter.CUSTOMER_USER_ID|(% style="width:200px" %)String
305 +|(% style="width:200px" %)EventParameter.CUSTOMER_SEGMENT|(% style="width:200px" %)String
306 +|(% style="width:200px" %)EventParameter.VALIDATED|(% style="width:200px" %)String
307 +|(% style="width:200px" %)EventParameter.RECEIPT_ID|(% style="width:200px" %)String
308 +|(% style="width:200px" %)EventParameter.ORDER_ID|(% style="width:200px" %)String
309 +|(% style="width:200px" %)EventParameter.TUTORIAL_ID|(% style="width:200px" %)String
310 +|(% style="width:200px" %)EventParameter.ACHIEVEMENT_ID|(% style="width:200px" %)String
311 +|(% style="width:200px" %)EventParameter.VIRTUAL_CURRENCY_NAME|(% style="width:200px" %)String
312 +|(% style="width:200px" %)EventParameter.DEEP_LINK|(% style="width:200px" %)String
313 +|(% style="width:200px" %)EventParameter.OLD_VERSION|(% style="width:200px" %)String
314 +|(% style="width:200px" %)EventParameter.NEW_VERSION|(% style="width:200px" %)String
315 +|(% style="width:200px" %)EventParameter.REVIEW_TEXT|(% style="width:200px" %)String
316 +|(% style="width:200px" %)EventParameter.COUPON_CODE|(% style="width:200px" %)String
317 +|(% style="width:200px" %)EventParameter.DEPARTING_DEPARTURE_DATE|(% style="width:200px" %)String
318 +|(% style="width:200px" %)EventParameter.RETURNING_DEPARTURE_DATE|(% style="width:200px" %)String
319 +|(% style="width:200px" %)EventParameter.DESTINATION_LIST|(% style="width:200px" %)String[]
320 +|(% style="width:200px" %)EventParameter.CITY|(% style="width:200px" %)String
321 +|(% style="width:200px" %)EventParameter.REGION|(% style="width:200px" %)String
322 +|(% style="width:200px" %)EventParameter.COUNTRY|(% style="width:200px" %)String
323 +|(% style="width:200px" %)EventParameter.DEPARTING_ARRIVAL_DATE|(% style="width:200px" %)String
324 +|(% style="width:200px" %)EventParameter.RETURNING_ARRIVAL_DATE|(% style="width:200px" %)String
325 +|(% style="width:200px" %)EventParameter.SUGGESTED_DESTINATIONS|(% style="width:200px" %)String[]
326 +|(% style="width:200px" %)EventParameter.TRAVEL_START|(% style="width:200px" %)String
327 +|(% style="width:200px" %)EventParameter.TRAVEL_END|(% style="width:200px" %)String
328 +|(% style="width:200px" %)EventParameter.NUM_ADULTS|(% style="width:200px" %)Integer
329 +|(% style="width:200px" %)EventParameter.NUM_CHILDREN|(% style="width:200px" %)Integer
330 +|(% style="width:200px" %)EventParameter.NUM_INFANTS|(% style="width:200px" %)Integer
331 +|(% style="width:200px" %)EventParameter.SUGGESTED_HOTELS|(% style="width:200px" %)String[]
332 +|(% style="width:200px" %)EventParameter.USER_SCORE|(% style="width:200px" %)Float
333 +|(% style="width:200px" %)EventParameter.HOTEL_SCORE|(% style="width:200px" %)Float
334 +|(% style="width:200px" %)EventParameter.PURCHASE_CURRENCY|(% style="width:200px" %)String
335 +|(% style="width:200px" %)EventParameter.PREFERRED_STAR_RATINGS|(% style="width:200px" %)Integer[2]
336 +|(% style="width:200px" %)EventParameter.PREFERRED_PRICE_RANGE|(% style="width:200px" %)Integer[2]
337 +|(% style="width:200px" %)EventParameter.PREFERRED_NEIGHBORHOODS|(% style="width:200px" %)String[]
338 +|(% style="width:200px" %)EventParameter.PREFERRED_NUM_STOPS|(% style="width:200px" %)Integer
339 +|(% style="width:200px" %)EventParameter.CONTENT|(% style="width:200px" %)String
340 +|(% style="width:200px" %)EventParameter.PARAM_1|(% style="width:200px" %)String
341 +|(% style="width:200px" %)EventParameter.PARAM_2|(% style="width:200px" %)String
342 +|(% style="width:200px" %)EventParameter.PARAM_3|(% style="width:200px" %)String
343 +|(% style="width:200px" %)EventParameter.PARAM_4|(% style="width:200px" %)String
344 +|(% style="width:200px" %)EventParameter.PARAM_5|(% style="width:200px" %)String
345 +|(% style="width:200px" %)EventParameter.PARAM_6|(% style="width:200px" %)String
346 +|(% style="width:200px" %)EventParameter.PARAM_7|(% style="width:200px" %)String
347 +|(% style="width:200px" %)EventParameter.PARAM_8|(% style="width:200px" %)String
348 +|(% style="width:200px" %)EventParameter.PARAM_9|(% style="width:200px" %)String
349 +|(% style="width:200px" %)EventParameter.PARAM_10|(% style="width:200px" %)String
350 +
351 += 5. Additional Configuration (Optional) =
352 +
353 +== 5.1 Setting Permissions ==
354 +
355 +SDK will collect data types to which it has permission.
356 +
357 +IMPORTANT: On Android >= 6.0 your application must also request for some permissions at runtime.
358 +MobigateSDK doesn’t request for any permissions on its own.([[Learnmore>>https://developer.android.com/training/permissions/requesting.html]])
359 +
360 +== 5.2 Configuring data Collectors ==
361 +
362 +By default, when calling startService() MobigateSDK will collect all kinds of data supported by the SDK and allowed by the permissions from Android manifest (and runtime permissions on Android >=6.0). To ensure that you collect as much data as possible add the following permissions into your application:
363 +
364 +{{code language="xml"}}
365 + <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" ></uses-permission>
366 + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" ></uses-permission>
367 + <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" ></uses-permission>
368 + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" ></uses-permission>
369 + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" ></uses-permission>
370 + <uses-permission android:name="android.permission.READ_PHONE_STATE" ></uses-permission>
371 + <uses-permission android:name="android.permission.GET_PACKAGE_SIZE" ></uses-permission>
372 + <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" ></uses-permission>
373 + <uses-permission android:name="android.permission.GET_TASKS" ></uses-permission>
374 + <uses-permission android:name="android.permission.READ_CALENDAR" ></uses-permission>
375 + <uses-permission android:name="android.permission.READ_CONTACTS" ></uses-permission>
376 + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" ></uses-permission>
377 + <uses-permission android:name="android.permission.READ_USER_DICTIONARY" ></uses-permission>
378 + <uses-permission android:name="android.permission.BLUETOOTH" ></uses-permission>
379 + <uses-permission android:name="android.permission.NFC" ></uses-permission>
380 + <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" ></uses-permission>
381 + <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" ></uses-permission>
382 +{{/code}}
383 +
384 +* You may specify subset of data types to be collected:
385 +
386 +{{code language="java"}}
387 +sdk.enableDataCollector(true, new int[] { DataCollector.GEOLOCATION,DataCollector.MEDIA_FILES, DataCollector.BROWSER, … });
388 +sdk.startService(context);
389 +{{/code}}
390 +
391 +* Or add them one by one:
392 +
393 +{{code language="java"}}
394 +sdk.enableDataCollector(true, DataCollector.BROWSER);
395 +sdk.enableDataCollector(true, DataCollector.GEOLOCATION);
396 +......
397 +sdk.startService(context);
398 +{{/code}}
399 +
400 +* Collectors list:
401 +
402 +{{code language="java"}}
403 +package pl.spicymobile.mobience.sdk;
404 +
405 +/***
406 + * Data collectors
407 + */
408 +public class DataCollector {
409 + /**
410 + * Collect all application's info on device
411 + * Optional permission:
412 + * android.permission.GET_PACKAGE_SIZE
413 + */
414 + public final static int APPS_LIST = 0;
415 +
416 + /**
417 + * Class collect time active an application
418 + * Required permissions:
419 + * android.permission.PACKAGE_USAGE_STATS (obligatory on android sdk >= Lollipop 5.0)
420 + * android.permission.GET_TASKS (obligatory on android sdk <= Kitkat 4.4)
421 + */
422 + public final static int APPS_USAGE = 1;
423 +
424 + /**
425 + * BatteryInfoCollector collects battery info: level; and charge event
426 + */
427 + public final static int BATTERY = 2;
428 +
429 + /**
430 + * Collecting data on browser history, bookmarks, pharses
431 + * Required permissions:
432 + * com.android.browser.permission.READ_HISTORY_BOOKMARKS (Removed since android sdk >= Marshmallow 6.0) on Android api level < Lollipop 5.0
433 + * turned on accessibility for application on Android api level >= Lollipop 5.0
434 + */
435 + public final static int BROWSER = 3;
436 +
437 + /**
438 + * Collects calendar events data of a device, with a range of days : before 100 days and after 100 days with the collecting day
439 + * Required permissions:
440 + * android.permission.READ_CALENDAR
441 + */
442 + public final static int CALENDAR_EVENTS = 4;
443 +
444 + /**
445 + * Collect process running cpu on device at time request
446 + */
447 + public final static int CPU_PROCESS = 6;
448 +
449 + /**
450 + * Collect all data Dictionary of user on device
451 + * Required permissions:
452 + * android.permission.READ_USER_DICTIONARY
453 + */
454 + public final static int DICTIONARY = 7;
455 +
456 + /**
457 + * Geolocalization coordinates of a device, information of current GSM cell and GSM signal strength
458 + * Required permissions:
459 + * android.permission.ACCESS_FINE_LOCATION or android.permission.ACCESS_COARSE_LOCATION
460 + */
461 + public final static int GEOLOCATION = 8;
462 +
463 + /**
464 + * Collect all data about headset plugin's information
465 + */
466 + public final static int HEADSET_PLUG = 9;
467 +
468 + /**
469 + * Gather Media files information of device
470 + * Required permissions:
471 + * android.permission.WRITE_EXTERNAL_STORAGE3
472 + * android.permission.READ_EXTERNAL_STORAGE3 (on Android api level >= Jelly Bean 4.1)
473 + */
474 + public final static int MEDIA_FILES = 10;
475 +
476 + /**
477 + * Collect used memory info
478 + */
479 + public final static int MEMORY_USEAGE = 11;
480 +
481 + /**
482 + * Collect about connection information: "wifi" or "mobile data" or "no connection"
483 + * Required permissions:
484 + * android.permission.ACCESS_NETWORK_STATE
485 + */
486 + public final static int NETWORK_CONNECTION = 13;
487 +
488 + /**
489 + * Collect all network usage data from all application on device
490 + */
491 + public final static int NETWORK_USEAGE = 14;
492 +
493 + /**
494 + * Collect all package change event (install new app, remove app, data clear, restart app)
495 + */
496 + public final static int PACKAGE_CHANGE = 15;
497 +
498 + /**
499 + * Collect informations of a device, such as: Identifiers of device model, system version, IMSI, IP, network operator of SIM card and mobile network, WiFi network data, etc.
500 + * Optional permission:
501 + * android.permission.READ_PHONE_STATE
502 + * android.permission.ACCESS_NETWORK_STATE
503 + * android.permission.ACCESS_WIFI_STATE
504 + */
505 + public final static int PHONE_INFO = 16;
506 +
507 + /**
508 + * Catch event roaming
509 + * Required permissions:
510 + * android.permission.ACCESS_NETWORK_STATE
511 + */
512 + public final static int ROAMING = 17;
513 +
514 + /**
515 + * Collect data about device's orientation
516 + */
517 + public final static int SCREEN_ORIENTED = 18;
518 +
519 + /**
520 + * Collect phone signal info
521 + */
522 + public final static int SIGNAL_STRENGTH = 19;
523 +
524 + /**
525 + * Collect time change profile mode
526 + */
527 + public final static int PROFILE_MODE = 20;
528 +
529 + /**
530 + * Gather list of visible WiFi networks, information of each wifi
531 + * Required permission:
532 + * android.permission.ACCESS_WIFI_STATE
533 + * Android <= 8.1 (sdk level <= 27):
534 + * android.permission.ACCESS_FINE_LOCATION or android.permission.ACCESS_COARSE_LOCATION
535 + * android.permission.CHANGE_WIFI_STATE
536 + * Android 9.0, 10 (sdk level 28, 29)
537 + * enabled location services
538 + * Applications targeting Android 10 (API level 29) SDK or higher, has the android.permission.ACCESS_FINE_LOCATION
539 + */
540 + public final static int WIFI_DATA_CONNECTION = 21;
541 +
542 + /**
543 + * SDKApp
544 + * ion gathers every week list of all the Android permissions that it have and list of enabled data collectors from MobienceSDK
545 + */
546 + public final static int PERMISSION_COLLECTOR = 22;
547 +
548 + /**
549 + * NFC collector collects information of NFC funtion of that device, contains normal NFC NFED information
550 + * Required permissions:
551 + * android.permission.NFC
552 + */
553 + public final static int NFC_COLLECTOR = 23;
554 +
555 + /**
556 + * Bluetooth collector collects information of Bluetooth funtion of that device, contains normal Bluetooth information
557 + * Required permissions:
558 + * android.permission.BLUETOOTH
559 + */
560 + public final static int BLUETOOTH_COLLECTOR = 24;
561 +
562 + /**
563 + * Bluetooth device collector collects information of detecting connected devices via bluetooth
564 + * Required permissions:
565 + * android.permission.BLUETOOTH
566 + */
567 + public final static int BLUETOOTH_DEVICES_COLLECTOR = 26;
568 +
569 + /**
570 + * Activity recognition collector collects information about detected user activities (walking, running, driving, etc.)
571 + * Required permission:
572 + * com.google.android.gms.permission.ACTIVITY_RECOGNITION
573 + */
574 + public final static int MOVEMENT_COLLECTOR = 27;
575 +
576 + /**
577 + * Facebook collector collect informationabout user
578 + */
579 + public final static int FACEBOOK_NETWORK_COLLECTOR = 28;
580 +
581 + /**
582 + * Root data collector collects information if device is rooted
583 + */
584 + public final static int ROOT_COLLECTOR = 29;
585 +
586 + /**
587 + * Total collectors size
588 + */
589 + public final static int TOTAL_SIZE = 27;
590 +
591 +}
592 +
593 +{{/code}}
594 +
595 +== 5.3 Set email ==
596 +
597 +* To set user’s email, call:
598 +
599 +{{code language="java"}}
600 +MobigateSDK.get().setEmail("your_email");
601 +{{/code}}
602 +
603 +* Or with builder method:
604 +
605 +{{code language="java"}}
606 +SDK sdk = new MobigateSDK.Builder(getApplicationContext(),"Api_key").setEmail("your_email").build();
607 +{{/code}}
608 +
609 +== 5.4 Custom user ID ==
610 +
611 +You may use your custom userID for marking data. By default we are using device ID and emails for matching. Set it before starting the service using MobigateSDk.Builder method.
612 +
613 +{{code language="java"}}
614 +MobigateSDK.Builder(getApplicationContext(),"Api_key").setCustomUserID("customID").build();
615 +{{/code}}
616 +
617 +== 5.5 User and device identification ==
618 +
619 +MobigateSDK is gathering following user/device identifiers:
620 +
621 +* ANDROID_ID,
622 +* Android AdvertisingID (AAID) - requires Google Play Services implemented in app and available on device,
623 +* Mobigate own device ID (random UUID stored permanently on the device),
624 +* custom user ID, if set by method setCustomUserID(),
625 +* e-mail - provided by setEmail() method or read automatically if GET_ACCOUNTS permission is granted. This is usually user’s e-mail from Google Play account,
626 +* Wi-Fi MAC address - when Wi-Fi is enabled and ACCESS_WIFI_STATE permission is granted,
627 +* device’s „serial” number, as provided by Android,
628 +* IMEI - if device has telephony module. Requires READ_PHONE_STATE permission.
629 +
630 +By default MobigateSDK is gathering all identifiers, which it can read. You can indicate which fields gather to comply with your privacy policy. To specify gathering of given identifier, call Builder:
631 +
632 +{{code language="java"}}
633 +MobigateSDK.Builder().enableUserField(SDK.UserField... fields)
634 +{{/code}}
635 +
636 +Identifiers that can be disabled are: EMAIL, MAC, SERIAL, IMEI, IMSI.
637 +
638 +== 5.6 Logging and debugging ==
639 +
640 +Logging is enabled only while application is in DEBUG mode and is on by default.
641 +
642 +== 5.7 SDK information ==
643 +
644 +To get SDK info (version):
645 +
646 +{{code language="java"}}
647 +MobigateSDK.get().getSDKInfo();
648 +{{/code}}
649 +
650 +== 5.8 Data gather policy ==
651 +
652 +By default, on Android phones with sdk level lower than 26 MobigateSDK does not display a persistent notification when the service starts, but gathers data in the background
653 +On Android phones with sdk level >= 26 Google Play rules prohibit collecting data in background, without notification for user ([[Learn more>>https://play.google.com/intl/en-US_ALL/about/privacy-security/malicious-behavior/]]). In that case MobigateSDK by default block data gathering in background. You can change the default behavior by use the Builder following method:
654 +
655 +{{code language="java"}}
656 +MobigateSDK.Builder().setDataGatherPolicy(SDK.MONITOR_STATE.DEFAULT,"optional_notification_text")
657 +{{/code}}
658 +
659 +Possible monitor states:
660 +
661 +* SDK.MONITOR_STATE.DEFAULT,
662 +* SDK.MONITOR_STATE.HIDE_TRAY,
663 +* SDK.MONITOR_STATE.BLOCK_DATA_BG.
664 +
665 +== 5.9 Advertising systems ==
666 +
667 +* Method that returns the IDs user profiles
668 +
669 +Software MobigateSDK based on data collected assigns user IDs profile. IDs can be use to send to an ad server.
670 +To enable functionality (only once, necessarily before the first call Mobigate.startService()):
671 +
672 +{{code language="java"}}
673 +MobigateSDK.get().enableIDsProfiles(true);
674 +{{/code}}
675 +
676 +To get the IDs profiles for the user (at any time and anywhere in the application):
677 +
678 +{{code language="java"}}
679 +MobigateSDK.get().getIDsProfiles();
680 +{{/code}}
681 +
682 +List of IDs profiles in the application memory is updated (synchronized with the server) at specified intervals.
683 +
684 +* Optional integration with AdOcean module from GemiusSDK
685 +
686 +{{code language="java"}}
687 +Map<String, Long> MobigateSDK.get().getAdOceanTargeting();
688 +{{/code}}
689 +
690 +This method is intended for use with "setNumericalVariables" method from GemiusSDK (AdOcean module).
691 +Sample usage:
692 +
693 +{{code language="java"}}
694 +FullScreenAd interstitial1 = new FullScreenAd(context, INTERSTITIAL1_PLACEMENT_ID);
695 +interstitial1.setNumericalVariables(MobigateSDK.getAdOceanTargeting());
696 +interstitial1.open();
697 +{{/code}}
698 +
699 +Same applies to billboard adds.
700 +
701 +This way user identifiers are passed to AdOcean AdServer as „numerical variables”, that can be used for ads targeting.
702 +
703 +**getAdOceanTargeting()** method returns 3 different identifiers of a user, encoded into a map of AdOcean numerical variables.
704 +
705 +* Mobigate user identifier,
706 +* ANDROID_ID,
707 +* Android Advertising ID (requires Google Play Services implemented in app and available on device).
708 +
709 +Please ask our representative for instructions on configuring targeting in AdOcean panel.
710 +
711 +
712 += 6. Testing SDK integration =
713 +
714 +Integrating our SDK is easy and straightforward. Nevertheless, we highly recommend that you test the integration before submitting the app to the app store.
715 +\\The easiest way to test integration is to install our testing application from the play store. [[You can find it here>>https://play.google.com/store/apps/details?id=pl.spicymobile.sdk.integration]]
716 +
717 +
718 +Testing application is very simple. After installation, point your application from list and run the test. The result will appear in a new application window. If no warning signs have appeared, it means that the library is well integrated into your application.
Spicy Mobile
spicymobile.pl