reactnative-plugin-appice 1.7.10 → 1.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -2
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/com/reactlibrary/AppICEUtils.java +55 -10
- package/android/src/main/java/com/reactlibrary/AppIceReactPluginModule.java +108 -57
- package/android/src/main/java/com/reactlibrary/EnumConstants.java +2 -5
- package/android/src/main/java/com/reactlibrary/StringConstants.java +8 -3
- package/example/App.js +181 -218
- package/example/HelloWorldApp.js +483 -0
- package/example/ancilliary.js +327 -0
- package/example/android/app/build.gradle +2 -0
- package/example/android/app/google-services.json +275 -0
- package/example/android/app/src/main/java/com/example/MainApplication.java +4 -0
- package/example/android/build.gradle +20 -0
- package/example/android/local.properties +8 -0
- package/example/package-lock.json +16722 -0
- package/example/package.json +1 -1
- package/index.js +1 -1
- package/ios/AppIceReactPlugin.m +2 -2
- package/package.json +1 -1
- package/example/android/.gradle/7.3.3/checksums/checksums.lock +0 -0
- package/example/android/.gradle/7.3.3/fileChanges/last-build.bin +0 -0
- package/example/android/.gradle/7.3.3/fileHashes/fileHashes.lock +0 -0
- package/example/android/.gradle/7.3.3/gc.properties +0 -0
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/yarn.lock +0 -7176
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/* eslint-disable prettier/prettier */
|
|
2
|
+
const AppICE = require('reactnative-plugin-appice');
|
|
3
|
+
|
|
4
|
+
/* eslint-disable prettier/prettier */
|
|
5
|
+
/**
|
|
6
|
+
* Helper method to set user profile
|
|
7
|
+
* @param {object} profile - key-value profile properties.
|
|
8
|
+
*/
|
|
9
|
+
const setUser = (profile) => {
|
|
10
|
+
var age = 0;
|
|
11
|
+
var email;
|
|
12
|
+
var phone;
|
|
13
|
+
if (profile.age && profile.age != null && profile.age > 0) {
|
|
14
|
+
age = calculateAge(profile.age);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
email = hasMF(profile.email) ? '' : validateEmail(profile.email);
|
|
18
|
+
phone = hasMF(profile.phone) ? '' : profile.phone;
|
|
19
|
+
|
|
20
|
+
AppICE.setUser({
|
|
21
|
+
[AppICE.name]: profile.name,
|
|
22
|
+
[AppICE.phone]: phone,
|
|
23
|
+
[AppICE.email]: email,
|
|
24
|
+
[AppICE.dob]: profile.dob,
|
|
25
|
+
[AppICE.age]: age,
|
|
26
|
+
[AppICE.gender]: profile.gender,
|
|
27
|
+
[AppICE.educationType]: profile.educationType,
|
|
28
|
+
[AppICE.employmentType]: profile.employmentType,
|
|
29
|
+
[AppICE.married]: profile.married,
|
|
30
|
+
[AppICE.isEmployed]: profile.isEmployed,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Helper method to calculate age from birth year
|
|
36
|
+
* @param {string} birthYear - Year of birth as a string (e.g., '1990')
|
|
37
|
+
* @returns {number} - Age in years
|
|
38
|
+
*/
|
|
39
|
+
const calculateAge = (birthYear: string) => {
|
|
40
|
+
let age;
|
|
41
|
+
// Convert the birth year from string to integer
|
|
42
|
+
if(birthYear != null){
|
|
43
|
+
const birthYearInt = parseInt(birthYear, 10);
|
|
44
|
+
const currentYear = new Date().getFullYear();
|
|
45
|
+
age = currentYear - birthYearInt;
|
|
46
|
+
}
|
|
47
|
+
else{
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
return age;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
function getMessageCounts(
|
|
55
|
+
type: number,
|
|
56
|
+
userids: string[],
|
|
57
|
+
timeout: number,
|
|
58
|
+
callback: {(result: number): void; (arg0: any): void},
|
|
59
|
+
) {
|
|
60
|
+
AppICE.synchronizeInbox(timeout, (res: any) => {
|
|
61
|
+
if (res) {
|
|
62
|
+
console.log(
|
|
63
|
+
'getMessageCounts inside the sync type = ' +
|
|
64
|
+
type +
|
|
65
|
+
', userid = ' +
|
|
66
|
+
userids,
|
|
67
|
+
);
|
|
68
|
+
AppICE.getMessageCount(1, userids, (res: string) => {
|
|
69
|
+
if (res) {
|
|
70
|
+
console.log('getMessageCounts inside the sync res = ' + res);
|
|
71
|
+
callback(res);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
console.log(
|
|
76
|
+
'getMessageCounts outside the sync type = ' +
|
|
77
|
+
type +
|
|
78
|
+
', userid = ' +
|
|
79
|
+
userids,
|
|
80
|
+
);
|
|
81
|
+
console.log('inbox is not synced with server, showing old stored data');
|
|
82
|
+
AppICE.getMessageCount(1, userids, (res: any) => {
|
|
83
|
+
if (res) {
|
|
84
|
+
callback(res);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function updatedInboxMessage(
|
|
92
|
+
messageId: string,
|
|
93
|
+
type: number,
|
|
94
|
+
userid: string,
|
|
95
|
+
callback: {(result: boolean): void; (arg0: any): void},
|
|
96
|
+
) {
|
|
97
|
+
AppICE.updateInboxMessage(messageId, type, userid, (res: boolean) => {
|
|
98
|
+
callback(res);
|
|
99
|
+
console.log('updateInboxMessage res : ' + res);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function getInboxMessages(
|
|
104
|
+
type: number,
|
|
105
|
+
userids: string[],
|
|
106
|
+
category: string,
|
|
107
|
+
limit: number,
|
|
108
|
+
offset: number,
|
|
109
|
+
timeout: number,
|
|
110
|
+
withServerHit: boolean,
|
|
111
|
+
callback: {(result: any): void; (arg0: string): void},
|
|
112
|
+
) {
|
|
113
|
+
if (withServerHit) {
|
|
114
|
+
AppICE.synchronizeInbox(timeout, (res: any) => {
|
|
115
|
+
if (res) {
|
|
116
|
+
AppICE.getInboxMessages(type, userids, async (res: any) => {
|
|
117
|
+
console.log('getInboxMessages ' + res);
|
|
118
|
+
if (res) {
|
|
119
|
+
const newData = JSON.stringify(res);
|
|
120
|
+
const result = await getFilteredData(
|
|
121
|
+
newData,
|
|
122
|
+
category,
|
|
123
|
+
limit,
|
|
124
|
+
offset,
|
|
125
|
+
);
|
|
126
|
+
console.log('getFilteredData 2: ', result);
|
|
127
|
+
const val = JSON.stringify(result);
|
|
128
|
+
console.log('getFilteredData 2: ', val);
|
|
129
|
+
if (val) {
|
|
130
|
+
console.log('internalGetInboxMessage 2' + val);
|
|
131
|
+
callback(val);
|
|
132
|
+
// getMediaDataKeys(res);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
} else {
|
|
137
|
+
AppICE.getInboxMessages(type, userids, async (res: any) => {
|
|
138
|
+
console.log('getInboxMessages ' + res);
|
|
139
|
+
if (res) {
|
|
140
|
+
const newData = JSON.stringify(res);
|
|
141
|
+
const result = await getFilteredData(
|
|
142
|
+
newData,
|
|
143
|
+
category,
|
|
144
|
+
limit,
|
|
145
|
+
offset,
|
|
146
|
+
);
|
|
147
|
+
console.log('getFilteredData 3: ', result);
|
|
148
|
+
const val = JSON.stringify(result);
|
|
149
|
+
console.log('getFilteredData 3: ', val);
|
|
150
|
+
if (val) {
|
|
151
|
+
console.log('internalGetInboxMessage 3' + val);
|
|
152
|
+
callback(val);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
} else {
|
|
159
|
+
AppICE.getInboxMessages(type, userids, async (res: any) => {
|
|
160
|
+
if (res) {
|
|
161
|
+
try {
|
|
162
|
+
const newData = JSON.stringify(res);
|
|
163
|
+
console.log('getInboxMessages newData' + newData);
|
|
164
|
+
const result = await getFilteredData(
|
|
165
|
+
newData,
|
|
166
|
+
category,
|
|
167
|
+
limit,
|
|
168
|
+
offset,
|
|
169
|
+
);
|
|
170
|
+
console.log('getFilteredData result' + result);
|
|
171
|
+
|
|
172
|
+
const val = JSON.stringify(result);
|
|
173
|
+
console.log('getFilteredData stringify result val' + val);
|
|
174
|
+
|
|
175
|
+
if (val) {
|
|
176
|
+
console.log('internalGetInboxMessage 4' + val);
|
|
177
|
+
callback(val);
|
|
178
|
+
}
|
|
179
|
+
} catch (error) {
|
|
180
|
+
console.log('internalGetInboxMessage error' + error);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
async function getFilteredData(
|
|
188
|
+
newData: string,
|
|
189
|
+
category: string,
|
|
190
|
+
limit: number,
|
|
191
|
+
offset: number | undefined,
|
|
192
|
+
) {
|
|
193
|
+
const jsonArray = JSON.parse(newData);
|
|
194
|
+
if (!jsonArray || !Array.isArray(jsonArray)) {
|
|
195
|
+
console.error('Invalid jsonArray:', jsonArray);
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Convert the provided category to lowercase for case-insensitive comparison
|
|
200
|
+
const lowerCaseCategory = category.toLowerCase();
|
|
201
|
+
|
|
202
|
+
// Count occurrences of each category with original case for the entire array
|
|
203
|
+
const categoryCount = jsonArray.reduce((acc, item) => {
|
|
204
|
+
const categoryName = item?.cdata?.category; // Added null checks
|
|
205
|
+
if (categoryName) {
|
|
206
|
+
acc[categoryName] = (acc[categoryName] || 0) + 1;
|
|
207
|
+
}
|
|
208
|
+
return acc;
|
|
209
|
+
}, {});
|
|
210
|
+
|
|
211
|
+
// Ensure that "chip A" and "chip B" are in the count array, even if they are not present in the filtered array
|
|
212
|
+
['Offers & Promotions', 'Alerts'].forEach(chip => {
|
|
213
|
+
if (!categoryCount[chip]) {
|
|
214
|
+
categoryCount[chip] = 0;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
// Filter the array based on the provided category (case-insensitive)
|
|
219
|
+
const filteredArray = jsonArray.filter(
|
|
220
|
+
item => item?.cdata?.category?.toLowerCase() === lowerCaseCategory,
|
|
221
|
+
);
|
|
222
|
+
console.log('slicedArray filteredArray ' + filteredArray);
|
|
223
|
+
|
|
224
|
+
// Apply limit and offset to the filtered array
|
|
225
|
+
const slicedArray = filteredArray.slice(offset, offset + limit);
|
|
226
|
+
console.log('slicedArray ' + JSON.stringify(slicedArray));
|
|
227
|
+
|
|
228
|
+
// Prepare the result object without assigning new values
|
|
229
|
+
const result = {
|
|
230
|
+
count: Object.entries(categoryCount).map(([key, value]) => ({
|
|
231
|
+
[key]: value,
|
|
232
|
+
})),
|
|
233
|
+
inboxData: await getMediaDataKeys(slicedArray),
|
|
234
|
+
};
|
|
235
|
+
console.log('filtered data ' + JSON.stringify(result));
|
|
236
|
+
return result;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
async function getMediaDataKeys(inboxMessages: any) {
|
|
240
|
+
const newInboxMessageData: any[] = [];
|
|
241
|
+
|
|
242
|
+
// Iterate over all messages in inboxMessages array
|
|
243
|
+
inboxMessages.forEach(async (message: any) => {
|
|
244
|
+
const mediaKey = 'imageUrl'; // Adjust media key as needed
|
|
245
|
+
const singleInboxMessage = Object.assign({}, message);
|
|
246
|
+
|
|
247
|
+
console.log('from server ', message);
|
|
248
|
+
try {
|
|
249
|
+
const mediaData = await new Promise((resolve, _reject) => {
|
|
250
|
+
AppICE.getMediaData(message, mediaKey, (mediaData: any) => {
|
|
251
|
+
resolve(mediaData);
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
// We have to check mediaData if it is valid only then we should call rest of the functions
|
|
255
|
+
const mediaUrl = await new Promise((resolve, _reject) => {
|
|
256
|
+
AppICE.getMediaUrl(message, mediaData, (mediaUrl: any) => {
|
|
257
|
+
resolve(mediaUrl);
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
const mediaType = await new Promise((resolve, _reject) => {
|
|
261
|
+
AppICE.getMediaType(message, mediaData, (mediaType: any) => {
|
|
262
|
+
resolve(mediaType);
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
const mediaThumbnail = await new Promise((resolve, _reject) => {
|
|
266
|
+
AppICE.getMediaThumbnail(message, mediaData, (mediaThumbnail: any) => {
|
|
267
|
+
resolve(mediaThumbnail);
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
console.log('==================================================');
|
|
271
|
+
console.log('singleInboxMessage:', singleInboxMessage);
|
|
272
|
+
console.log('mediaUrl:', mediaUrl);
|
|
273
|
+
console.log('mediaType:', mediaType);
|
|
274
|
+
console.log('mediaThumbnail:', mediaThumbnail);
|
|
275
|
+
// Add media data to singleInboxMessage
|
|
276
|
+
singleInboxMessage.mediaUrl = mediaUrl;
|
|
277
|
+
singleInboxMessage.mediaType = mediaType;
|
|
278
|
+
singleInboxMessage.mediaThumbnail = mediaThumbnail;
|
|
279
|
+
|
|
280
|
+
// Push singleInboxMessage to newInboxMessageData
|
|
281
|
+
newInboxMessageData.push(singleInboxMessage);
|
|
282
|
+
|
|
283
|
+
console.log('final Media newInboxMessageData push:', newInboxMessageData);
|
|
284
|
+
console.log('==================================================');
|
|
285
|
+
} catch (error) {
|
|
286
|
+
console.error('Error fetching media data:', error);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
// Wait for all asynchronous operations to complete before returning
|
|
291
|
+
return new Promise(resolve => {
|
|
292
|
+
setTimeout(() => {
|
|
293
|
+
resolve(newInboxMessageData);
|
|
294
|
+
console.log('Media newInboxMessageData promise:', newInboxMessageData);
|
|
295
|
+
}, 500); //millisecond
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Helper method to validate the email and checks if email contains gender values(m/f)
|
|
300
|
+
* @param {string} email - Email address as a string
|
|
301
|
+
* @returns {string} - Valid email address or an empty string if invalid
|
|
302
|
+
*/
|
|
303
|
+
const validateEmail = (email) => {
|
|
304
|
+
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
305
|
+
if (email === 'm' || email === 'M' || email === 'F' || email === 'f') {
|
|
306
|
+
email = '';
|
|
307
|
+
}
|
|
308
|
+
if (!emailPattern.test(email)) {
|
|
309
|
+
return '';
|
|
310
|
+
}
|
|
311
|
+
return email;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
//common method that checks if email or phone contains gender values(m/f/M/F)
|
|
315
|
+
const hasMF = (value) => {
|
|
316
|
+
if (value === 'm' || value === 'M' || value === 'F' || value === 'f') {
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
319
|
+
return false;
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
module.exports = {
|
|
323
|
+
getInboxMessages,
|
|
324
|
+
updatedInboxMessage,
|
|
325
|
+
setUser,
|
|
326
|
+
getMessageCounts,
|
|
327
|
+
};
|
|
@@ -276,6 +276,8 @@ dependencies {
|
|
|
276
276
|
exclude group:'com.facebook.flipper'
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
implementation 'appice.io.android:sdk:2.5.78'
|
|
280
|
+
|
|
279
281
|
if (enableHermes) {
|
|
280
282
|
//noinspection GradleDynamicVersion
|
|
281
283
|
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project_info": {
|
|
3
|
+
"project_number": "372849797851",
|
|
4
|
+
"firebase_url": "https://appice-77b2f.firebaseio.com",
|
|
5
|
+
"project_id": "appice-77b2f",
|
|
6
|
+
"storage_bucket": "appice-77b2f.appspot.com"
|
|
7
|
+
},
|
|
8
|
+
"client": [
|
|
9
|
+
{
|
|
10
|
+
"client_info": {
|
|
11
|
+
"mobilesdk_app_id": "1:372849797851:android:776d01f156f84911337afe",
|
|
12
|
+
"android_client_info": {
|
|
13
|
+
"package_name": "com.appice.appicekonyapp"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"oauth_client": [
|
|
17
|
+
{
|
|
18
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
19
|
+
"client_type": 3
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"api_key": [
|
|
23
|
+
{
|
|
24
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"services": {
|
|
28
|
+
"appinvite_service": {
|
|
29
|
+
"other_platform_oauth_client": [
|
|
30
|
+
{
|
|
31
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
32
|
+
"client_type": 3
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"client_info": {
|
|
40
|
+
"mobilesdk_app_id": "1:372849797851:android:3ca6b71623dd87b8337afe",
|
|
41
|
+
"android_client_info": {
|
|
42
|
+
"package_name": "com.appice.libkonywrapper"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"oauth_client": [
|
|
46
|
+
{
|
|
47
|
+
"client_id": "372849797851-rf9dhoh54bkug4eo0mm2bvjm0mvcqi41.apps.googleusercontent.com",
|
|
48
|
+
"client_type": 1,
|
|
49
|
+
"android_info": {
|
|
50
|
+
"package_name": "com.appice.libkonywrapper",
|
|
51
|
+
"certificate_hash": "a73330c6da42d1219e27ca9a1c41d3ab76b18fec"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
56
|
+
"client_type": 3
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"api_key": [
|
|
60
|
+
{
|
|
61
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"services": {
|
|
65
|
+
"appinvite_service": {
|
|
66
|
+
"other_platform_oauth_client": [
|
|
67
|
+
{
|
|
68
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
69
|
+
"client_type": 3
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"client_info": {
|
|
77
|
+
"mobilesdk_app_id": "1:372849797851:android:043dfbf436ee8a8b337afe",
|
|
78
|
+
"android_client_info": {
|
|
79
|
+
"package_name": "com.appice.sample"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"oauth_client": [
|
|
83
|
+
{
|
|
84
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
85
|
+
"client_type": 3
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"api_key": [
|
|
89
|
+
{
|
|
90
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"services": {
|
|
94
|
+
"appinvite_service": {
|
|
95
|
+
"other_platform_oauth_client": [
|
|
96
|
+
{
|
|
97
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
98
|
+
"client_type": 3
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"client_info": {
|
|
106
|
+
"mobilesdk_app_id": "1:372849797851:android:b991be6c3a77e27a337afe",
|
|
107
|
+
"android_client_info": {
|
|
108
|
+
"package_name": "com.appice.simpleapp"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"oauth_client": [
|
|
112
|
+
{
|
|
113
|
+
"client_id": "372849797851-2g3ujjdnre9eg4t8915t667mci986imc.apps.googleusercontent.com",
|
|
114
|
+
"client_type": 1,
|
|
115
|
+
"android_info": {
|
|
116
|
+
"package_name": "com.appice.simpleapp",
|
|
117
|
+
"certificate_hash": "7a4661ffa5ed1bfa4ec46f7c113e16cf7cbcc2e5"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
122
|
+
"client_type": 3
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"api_key": [
|
|
126
|
+
{
|
|
127
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"services": {
|
|
131
|
+
"appinvite_service": {
|
|
132
|
+
"other_platform_oauth_client": [
|
|
133
|
+
{
|
|
134
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
135
|
+
"client_type": 3
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"client_info": {
|
|
143
|
+
"mobilesdk_app_id": "1:372849797851:android:d83e963ad537f8fb337afe",
|
|
144
|
+
"android_client_info": {
|
|
145
|
+
"package_name": "com.example.abc"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"oauth_client": [
|
|
149
|
+
{
|
|
150
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
151
|
+
"client_type": 3
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"api_key": [
|
|
155
|
+
{
|
|
156
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"services": {
|
|
160
|
+
"appinvite_service": {
|
|
161
|
+
"other_platform_oauth_client": [
|
|
162
|
+
{
|
|
163
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
164
|
+
"client_type": 3
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"client_info": {
|
|
172
|
+
"mobilesdk_app_id": "1:372849797851:android:3cbb0f051cfe9e32337afe",
|
|
173
|
+
"android_client_info": {
|
|
174
|
+
"package_name": "com.example.sdk_onoff"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"oauth_client": [
|
|
178
|
+
{
|
|
179
|
+
"client_id": "372849797851-lutbfvgtkp9imddhgvnhsogjmn36u0fs.apps.googleusercontent.com",
|
|
180
|
+
"client_type": 1,
|
|
181
|
+
"android_info": {
|
|
182
|
+
"package_name": "com.example.sdk_onoff",
|
|
183
|
+
"certificate_hash": "ce4b16335c5e8623dd2a4f1a5d8a5679960c0f02"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
188
|
+
"client_type": 3
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"api_key": [
|
|
192
|
+
{
|
|
193
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"services": {
|
|
197
|
+
"appinvite_service": {
|
|
198
|
+
"other_platform_oauth_client": [
|
|
199
|
+
{
|
|
200
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
201
|
+
"client_type": 3
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"client_info": {
|
|
209
|
+
"mobilesdk_app_id": "1:372849797851:android:6338a6c717bbff3d337afe",
|
|
210
|
+
"android_client_info": {
|
|
211
|
+
"package_name": "com.ironclad.testfcm"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"oauth_client": [
|
|
215
|
+
{
|
|
216
|
+
"client_id": "372849797851-fnshq30eqht27m893j14e7msi8jvp56n.apps.googleusercontent.com",
|
|
217
|
+
"client_type": 1,
|
|
218
|
+
"android_info": {
|
|
219
|
+
"package_name": "com.ironclad.testfcm",
|
|
220
|
+
"certificate_hash": "7a4661ffa5ed1bfa4ec46f7c113e16cf7cbcc2e5"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
225
|
+
"client_type": 3
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"api_key": [
|
|
229
|
+
{
|
|
230
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"services": {
|
|
234
|
+
"appinvite_service": {
|
|
235
|
+
"other_platform_oauth_client": [
|
|
236
|
+
{
|
|
237
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
238
|
+
"client_type": 3
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"client_info": {
|
|
246
|
+
"mobilesdk_app_id": "1:372849797851:android:4dffb4450c556236337afe",
|
|
247
|
+
"android_client_info": {
|
|
248
|
+
"package_name": "com.shailesh.xyz"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"oauth_client": [
|
|
252
|
+
{
|
|
253
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
254
|
+
"client_type": 3
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"api_key": [
|
|
258
|
+
{
|
|
259
|
+
"current_key": "AIzaSyAf6mf5vzNVdBKPlSKAxFCrHULO9NxU_wM"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"services": {
|
|
263
|
+
"appinvite_service": {
|
|
264
|
+
"other_platform_oauth_client": [
|
|
265
|
+
{
|
|
266
|
+
"client_id": "372849797851-klqni1jhqh49tsmaslfutlfg0b065vhb.apps.googleusercontent.com",
|
|
267
|
+
"client_type": 3
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"configuration_version": "1"
|
|
275
|
+
}
|
|
@@ -13,6 +13,8 @@ import com.example.newarchitecture.MainApplicationReactNativeHost;
|
|
|
13
13
|
import java.lang.reflect.InvocationTargetException;
|
|
14
14
|
import java.util.List;
|
|
15
15
|
|
|
16
|
+
import semusi.activitysdk.ContextApplication;
|
|
17
|
+
|
|
16
18
|
public class MainApplication extends Application implements ReactApplication {
|
|
17
19
|
|
|
18
20
|
private final ReactNativeHost mReactNativeHost =
|
|
@@ -56,6 +58,8 @@ public class MainApplication extends Application implements ReactApplication {
|
|
|
56
58
|
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
57
59
|
SoLoader.init(this, /* native exopackage */ false);
|
|
58
60
|
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
61
|
+
|
|
62
|
+
ContextApplication.initSdk(getApplicationContext(), this);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
/**
|
|
@@ -20,6 +20,16 @@ buildscript {
|
|
|
20
20
|
repositories {
|
|
21
21
|
google()
|
|
22
22
|
mavenCentral()
|
|
23
|
+
maven {
|
|
24
|
+
url "https://gitlab.com/api/v4/projects/10636887/packages/maven"
|
|
25
|
+
credentials(HttpHeaderCredentials) {
|
|
26
|
+
name = "Deploy-Token"
|
|
27
|
+
value = "PJMsxXdArqsmqDx4x5B6"
|
|
28
|
+
}
|
|
29
|
+
authentication {
|
|
30
|
+
header(HttpHeaderAuthentication)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
23
33
|
}
|
|
24
34
|
dependencies {
|
|
25
35
|
classpath("com.android.tools.build:gradle:7.1.1")
|
|
@@ -49,5 +59,15 @@ allprojects {
|
|
|
49
59
|
}
|
|
50
60
|
google()
|
|
51
61
|
maven { url 'https://www.jitpack.io' }
|
|
62
|
+
maven {
|
|
63
|
+
url "https://gitlab.com/api/v4/projects/10636887/packages/maven"
|
|
64
|
+
credentials(HttpHeaderCredentials) {
|
|
65
|
+
name = "Deploy-Token"
|
|
66
|
+
value = "PJMsxXdArqsmqDx4x5B6"
|
|
67
|
+
}
|
|
68
|
+
authentication {
|
|
69
|
+
header(HttpHeaderAuthentication)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
52
72
|
}
|
|
53
73
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
+
# as it contains information specific to your local configuration.
|
|
3
|
+
#
|
|
4
|
+
# Location of the SDK. This is only used by Gradle.
|
|
5
|
+
# For customization when using a Version Control System, please read the
|
|
6
|
+
# header note.
|
|
7
|
+
#Tue Nov 28 00:45:30 IST 2023
|
|
8
|
+
sdk.dir=/Users/amit/Library/Android/sdk
|