Giter Club home page Giter Club logo

exponea-android-sdk's People

Contributors

adam1929 avatar brianestrada avatar chnt avatar dmitrykolpo avatar dominik-hadl avatar frantisekgazo avatar igi4 avatar igor-liska avatar johsoe avatar josepoq avatar levinzonr avatar mcerovsky avatar michaela-dev avatar nharbo avatar nickskull avatar nvankampenhout avatar psabata-kiwi avatar ricardotokashiki avatar tgo1014 avatar tomas-istenik-pnx avatar wassil avatar xcibik00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

exponea-android-sdk's Issues

Push notifications with type "Deep link" do not trigger deeplink action when notification clicked from device lock screen

Issue:

I have set up an Exponea push notification on the web console with type "Deeplink" and a url that should deeplink into my app.

When testing this whilst a device is unlocked, I successfully receive the push notification and clicking it correctly deeplinks into my app.

When I interact with this push notification on the device lock screen, no deeplink handling is triggered when the the device unlocks.

Repro steps:

  1. The notification is successfully pushed to the device.
  2. Clicking on the notification correctly fires a pending intent broadcast to be handled by the ExponeaPushReceiver class.
  3. ExponeaPushReceiver receives the intent. (I can verify this through logging created by the ExponeaPushReceiver when it receives a notification)
  4. The Pending intent that should trigger the deeplink action does not fire / work as intented.

Improvement - tracking URL with "click" for in-app messages

Currently, click responses for in-app messages are tracking only text of button which was clicked.

For example:
Make button in fullscreen in-app with text "Google", which will redirect user to "https://google.com". When in-app is displayed and user clicks on button, event type "banner" is tracked with action = click, attribute text will be set to "Google". So:
action = click
text = Google
+ other banner attributes...

Request is to track URL https://google.com as well. So final list of attributes:
action = click
text = Google
url = https://google.com
+ other banner attributes...

In-App Message not being handled by SDK

Hello, with latest sdk 2.7.2 we tried to setup In-App messages. While I can see in networks logs message being received correctly by the app, I dont see any "modal" window showing up. With some small debugging I see fetchManager.fetchInAppMessages called correctly with onSuccess callback executed, however pendingShowRequests never gets populated so it doesnt show anything. This happens both with "app load" and custom event triggers. As this shows up still with BETA tag in exponea console let me know if I'm trying something that isn't actually fully supported yet. Thanks

In App message crashes with okhttp logging library

FATAL EXCEPTION: OkHttp Dispatcher java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Util; at com.exponea.sdk.util.HtmlNormalizer.asBase64Image(HtmlNormalizer.kt:245) at com.exponea.sdk.util.HtmlNormalizer.makeImagesToBeOffline(HtmlNormalizer.kt:226) at com.exponea.sdk.util.HtmlNormalizer.normalize(HtmlNormalizer.kt:81) at com.exponea.sdk.manager.InAppMessageManagerImpl.show(InAppMessageManagerImpl.kt:302) at com.exponea.sdk.manager.InAppMessageManagerImpl.showPendingMessage(InAppMessageManagerImpl.kt:211) at com.exponea.sdk.manager.InAppMessageManagerImpl.access$showPendingMessage(InAppMessageManagerImpl.kt:45) at com.exponea.sdk.manager.InAppMessageManagerImpl$preloadImageAndShowPending$1$4.invoke(InAppMessageManagerImpl.kt:135) at com.exponea.sdk.manager.InAppMessageManagerImpl$preloadImageAndShowPending$1$4.invoke(InAppMessageManagerImpl.kt:133) at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$preload$perImageCallback$1.invoke(InAppMessageBitmapCacheImpl.kt:61) at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$preload$perImageCallback$1.invoke(InAppMessageBitmapCacheImpl.kt:58) at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$downloadImage$1.onResponse(InAppMessageBitmapCacheImpl.kt:97) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:535) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012) Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.Util" on path: DexPathList[[...///]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.exponea.sdk.util.HtmlNormalizer.asBase64Image(HtmlNormalizer.kt:245)  at com.exponea.sdk.util.HtmlNormalizer.makeImagesToBeOffline(HtmlNormalizer.kt:226)  at com.exponea.sdk.util.HtmlNormalizer.normalize(HtmlNormalizer.kt:81)  at com.exponea.sdk.manager.InAppMessageManagerImpl.show(InAppMessageManagerImpl.kt:302)  at com.exponea.sdk.manager.InAppMessageManagerImpl.showPendingMessage(InAppMessageManagerImpl.kt:211)  at com.exponea.sdk.manager.InAppMessageManagerImpl.access$showPendingMessage(InAppMessageManagerImpl.kt:45)  at com.exponea.sdk.manager.InAppMessageManagerImpl$preloadImageAndShowPending$1$4.invoke(InAppMessageManagerImpl.kt:135)  at com.exponea.sdk.manager.InAppMessageManagerImpl$preloadImageAndShowPending$1$4.invoke(InAppMessageManagerImpl.kt:133)  at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$preload$perImageCallback$1.invoke(InAppMessageBitmapCacheImpl.kt:61)  at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$preload$perImageCallback$1.invoke(InAppMessageBitmapCacheImpl.kt:58)  at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$downloadImage$1.onResponse(InAppMessageBitmapCacheImpl.kt:97)  at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:535)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)  at java.lang.Thread.run(Thread.java:1012) 

This happens when I try to add com.squareup.okhttp3:logging-interceptor on my gradle
I tried updating my okhttp3 also to
implementation "com.squareup.okhttp3:logging-interceptor:4.10.0" (stable one)

but that issue still occurs

How to get customer cookie?

Hi and sorry for posting here, I don't know where to address you privately,

we are trying to acquire customer cookie equivalently to iOS-version of this:

Exponea.shared.customerCookie

Is this possible with Android SDK?

BillingClient crash

Hi,

I have a problem with exponea sdk. I integrated version 1.1.7 and when i try to initialize sdk, app goes crashing and i get this message:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.scratchy.app.inc, PID: 23900
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference
at java.util.ArrayList.(ArrayList.java:191)
at com.android.billingclient.api.SkuDetailsParams$Builder.build(SkuDetailsParams.java:72)
at com.exponea.sdk.manager.IapManagerImpl.getAvailableProducts(IapManagerImpl.kt:77)
at com.exponea.sdk.manager.IapManagerImpl$configure$1.onBillingSetupFinished(IapManagerImpl.kt:33)
at com.android.billingclient.api.BillingClientImpl$BillingServiceConnection.onServiceConnected(BillingClientImpl.java:1030)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1652)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1681)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Could you help me please?

notificationDataCallback

Hello,

Does this feature

Exponea.notificationDataCallback = {
extra -> //handle the extras value
}

works correctly ?
It is triggered with every delievered PUSH, and not only with the ones that contains "Additional Data" / extra data, bcs it contains always basic information sent in campaign events like campaign_name, action_type etc.

And also, if i send extra data with same name as those basic information e.g. action_type it is ignored

Manually tracked token is not tracked

We are using manual tracking (automaticPushNotification=false).

Until 3.5.0, it was working for us - we are calling Exponea.trackPushToken as described in documentation. However, after the update to 3.5.0 it does not work anymore.

We get this warning:

Push token stored but not tracked: SDK configuration has 'automaticPushNotification' == false

Callstack:

InApp messages transaction too Large

Hi,

recently we start to use Exponea InAppMessages feature. After some time we noticed that our app start crashing on TransactionTooLargeException. The crashes have significant increase when InApp messages are active in our Android app.
We could not find any big transactions in our application and we could not replicate this problem either. :/

Please, could you check your Android library?

MicrosoftTeams-image (9)

image

Fatal Exception: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 530552 bytes
at android.app.ActivityClient.activityStopped(ActivityClient.java:86)
at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:143)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Caused by android.os.TransactionTooLargeException: data parcel size 530552 bytes
at android.os.BinderProxy.transactNative(BinderProxy.java)
at android.os.BinderProxy.transact(BinderProxy.java:635)
at android.app.IActivityClientController$Stub$Proxy.activityStopped(IActivityClientController.java:1358)
at android.app.ActivityClient.activityStopped(ActivityClient.java:83)
at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:143)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Thank You.

projectToken is empty or missing cause repeating calls to Exponea cloud endpoint - Android SDK only

Dears,

maybe that could be an issue to solve, when accessing Exponea cloud using Exponea Android SDK with empty projectToken.
The implementation SDK will call multiple times the Exponea api endpoint while the first response code is 404.
While the android app using this SDK is widely deployed and used it could cause an situation simillar to DDoS attack.
My suggestion is to return an application exception while projectToken is empty instead call the endpoint several times.

Thank you,
Tomas

Lacking documentation about incoming notifications.

Hi, we are trying to implement exponea notifications in our android App. But we lack the documentation to do so.
I am able to initialize exponea and even send properties that define user in exponea. I see my user and I see cookie.

What else do i need to do to add firebase to exponea and receive notification?
Should I send the field "google_push_notification_id" also as a property and put firebase token in there?

Are the notifications delivered directly throught firebase or should I implement custom exponea solution from SDK? Thank you

Problem with Robolectric

When i was try to add Robolectric test to our project, i was encountered with IllegalArgumentException.
Below you can find test project, where that problem was arise.
If you remove dependency from exponea module - the problem will disappear.
When i try to add exponea module manually (by downloading a source code) - problem also not reproduce.
RobolectricDemo.zip

NumberFormatException

Hi, nice sdk but i faced issue while integrating it into our project. In class ExponeaFirebaseMessageService there is crash in line 43
val data = gson.fromJson(dataString, NotificationData::class.java)

You trying parse campaignId that must be Long, but in push it String. So service crashes with NumberFormatException.

InAppMessageShowRequest.getRequestedAt() null pointer

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'long com.exponea.sdk.manager.InAppMessageShowRequest.getRequestedAt()' on a null object reference
       at com.exponea.sdk.manager.InAppMessageManagerImpl.pickPendingMessage(InAppMessageManagerImpl.java:169)
       at com.exponea.sdk.manager.InAppMessageManagerImpl.showPendingMessage(InAppMessageManagerImpl.java:183)
       at com.exponea.sdk.manager.InAppMessageManagerImpl.showPendingMessage$default(InAppMessageManagerImpl.java:182)
       at com.exponea.sdk.manager.InAppMessageManagerImpl$preload$2.invoke(InAppMessageManagerImpl.java:78)
       at com.exponea.sdk.manager.InAppMessageManagerImpl$preload$2.invoke(InAppMessageManagerImpl.java:38)
       at com.exponea.sdk.manager.FetchManagerImpl$getFetchCallback$1.onResponse(FetchManagerImpl.java:53)
       at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.java:519)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:919)

sdk 2.9.4,
Device
Brand:Xiaomi
Model:Redmi Note 7
Orientation: Portrait
RAM free: 1.05 GB
Disk free: 17.54 GB
Operating System
Version:10
Orientation: Portrait
Rooted:No

Firebase crashes at start up when Exponea and Firebase Performance in same project

Hi,

We are trying to use the Exponea SDK in our app but are running into an issue. using gradle, when I include the Exponea dependency into an app that already has the Firebase Performance dependency. I receive the following fatal error during app start up:

Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process {app package name}. Make sure to call FirebaseApp.initializeApp(Context) first.

This error occurs once Ive added the gradle dependency for Exponea. Even if I dont use the sdk or initialise it.

If I remove either Exponea or Firebase performance, the application runs correctly. I believe theres some kind of issue between the two.

These are my following dependency versions:

gradle tools : 3.3.0
kotlin : 1.3.20
firebase plugins: 1.1.5
exponea : 2.0.0
firebase core: 16.0.6
firebase messaging: 17.3.4
firebase performance: 16.2.3

README - API/Android support

Context

The README says :

This SDK supports API 14+ and Android 4+. If you wish to interact with Exponea on lower API/Android versions please refer to the [old SDK located here](https://github.com/infinario/android-sdk).

Problem

Since version 3.0.0 and specially this commit androidx.work:work-runtime-ktx has been updated to 2.7.1.

We can see on this release note that androidx.work:work-runtime-ktx > 2.7 needs app to target Android 12 (API 31).

As a consequence, I think the README should specificy that Exponea SDK < 3.0.0 support API 14-30.

Question

Am I correct ?
Should I make a PR for that ?

BroadcastReceiver trampolining forbidden in Android 12

https://developer.android.com/about/versions/12/behavior-changes-12#notification-trampolines
https://github.com/exponea/exponea-android-sdk/blob/develop/Documentation/PUSH.md#1-open-app

When users interact with notifications, some apps respond to notification taps by launching an app component that eventually starts the activity that the user finally sees and interacts with. This app component is known as a notification trampoline.
To improve app performance and UX, apps that target Android 12 cannot start activities from services or broadcast receivers that are used as notification trampolines. In other words, after the user taps on a notification, or an action button within the notification, your app cannot call startActivity() inside of a service or broadcast receiver.

Myslim si ze toto je presne tento pripad

App crash: Infinity is not a valid double value as per JSON specification. method. com.exponea.sdk.network.ExponeaServiceImpl.doPost

hello, app started crashing on this:
Fatal Exception: java.lang.IllegalArgumentException: Infinity is not a valid double value as per JSON specification. To override this behavior, use GsonBuilder.serializeSpecialFloatingPointValues() method. at com.google.gson.Gson.checkValidFloatingPoint(Gson.java:359) at com.google.gson.Gson$1.write(Gson.java:327) at com.google.gson.Gson$1.write(Gson.java:313) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.write(MapTypeAdapterFactory.java:208) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.write(MapTypeAdapterFactory.java:145) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:127) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:245) at com.google.gson.Gson.toJson(Gson.java:704) at com.google.gson.Gson.toJson(Gson.java:683) at com.google.gson.Gson.toJson(Gson.java:638) at com.google.gson.Gson.toJson(Gson.java:618) at com.exponea.sdk.network.ExponeaServiceImpl.doPost(ExponeaServiceImpl.kt:58) at com.exponea.sdk.network.ExponeaServiceImpl.postEvent(ExponeaServiceImpl.kt:21) at com.exponea.sdk.manager.FlushManagerImpl.routeSendingEvent(FlushManagerImpl.kt:120) at com.exponea.sdk.manager.FlushManagerImpl.trySendingEvent(FlushManagerImpl.kt:63) at com.exponea.sdk.manager.FlushManagerImpl.flushDataInternal(FlushManagerImpl.kt:49) at com.exponea.sdk.manager.FlushManagerImpl.access$flushDataInternal(FlushManagerImpl.kt:16) at com.exponea.sdk.manager.FlushManagerImpl$handleResponse$1.invoke(FlushManagerImpl.kt:113) at com.exponea.sdk.manager.FlushManagerImpl$handleResponse$1.invoke(FlushManagerImpl.kt:16) at com.exponea.sdk.util.ExtensionsKt$enqueue$1.onResponse(Extensions.kt:29) at com.google.firebase.perf.network.zzf.onResponse(com.google.firebase:firebase-perf@@19.0.3:22) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)

Click on notification with deeplink action does nothing

Hi.

We have updated the Exponea SDK in our app from ver. 2.9.5 to ver. 3.0.3 and the click on received notification with action defined as "deeplink" stopped working.

To be precise, it works only if the app is in foreground. Then the intent is routed to the activity and our app handles the navigation. However, if the same notification is received when the app is in the background or stopped, and the user taps on it, the notification disappears and nothing else happens. The deeplink intent is not even routed to the activity.

The status of the notification in the "Data and Assets" overview is "clicked".

Exponea version: 3.0.3
OS version: Android 11
Device vendor: Xiaomi
Device type: Mi 9

ExponeaPushReceiver does not receive broadcast on Android O

Android 8.0 changed the receivers that were allowed to be registered on the manifest. With some exceptions, no implicit broadcast receiver is allowed there. The broadcast that ExponeaPushReceiver is expecting is implicit, so it does not work on Android O.

No callback on error sending push token

I try to send push token to Exponea by calling
Exponea.trackPushToken(token)
but I can't know if it is really delivered successfully. Threre is no callback for this.
So now some users haven't push token in exponea, I forced to spam with push token to Exponea in every session.

How to disable sdk at runtime?

Hi, I'm working on adding explicit tracking consents to an app and would like some clarification as what to do when consent was removed by user.

If the sdk was not yet initialized, I simply don't initialize it and therefore nothing is tracked

However, if the sdk was initialized, as there is no "deinitialize" method, what's everything I need to disable to make the sdk not track anything (without restarting the app process)?

So far I have just Exponea.automaticSessionTracking = false

Anything else?

FetchManagerImpl.fetchInAppMessages - NullPointerException - Parameter specified as non-null is null

After update from 3.2.1 to 3.4.0 version we are facing with the following crash.
And the crash happens quite often.

Fatal Exception: java.lang.NullPointerException: Parameter specified as non-null is null: method com.exponea.sdk.manager.FetchManagerImpl$fetchInAppMessages$2.invoke, parameter result
       at com.exponea.sdk.manager.FetchManagerImpl$fetchInAppMessages$2.invoke(FetchManagerImpl.kt:160)
       at com.exponea.sdk.manager.FetchManagerImpl$fetchInAppMessages$2.invoke(FetchManagerImpl.kt:157)
       at com.exponea.sdk.manager.FetchManagerImpl$getFetchCallback$1.onResponse(FetchManagerImpl.kt:48)
       at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:933)

App crash: Couldn't create Paper dir ...EventDatabase

Hello,
Android app crashes, when using Exponea SDK -- Couldn't create Paper dir:

Fatal Exception: java.lang.RuntimeException: Couldn't create Paper dir: /data/user/0/XXXX/files/EventDatabase
       at io.paperdb.DbStoragePlainFile.createPaperDir(DbStoragePlainFile.java:325)
       at io.paperdb.DbStoragePlainFile.assertInit(DbStoragePlainFile.java:316)
       at io.paperdb.DbStoragePlainFile.deleteIfExists(DbStoragePlainFile.java:211)
       at io.paperdb.Book.delete(Book.java:116)
       at com.exponea.sdk.database.ExponeaDatabaseImpl.remove(ExponeaDatabaseImpl.kt:57)
       at com.exponea.sdk.repository.EventRepositoryImpl.remove(EventRepositoryImpl.kt:27)
       at com.exponea.sdk.manager.FlushManagerImpl.onEventSentSuccess(FlushManagerImpl.kt:115)
       at com.exponea.sdk.manager.FlushManagerImpl.access$onEventSentSuccess(FlushManagerImpl.kt:12)
       at com.exponea.sdk.manager.FlushManagerImpl$trackCustomer$1.invoke(FlushManagerImpl.kt:95)
       at com.exponea.sdk.manager.FlushManagerImpl$trackCustomer$1.invoke(FlushManagerImpl.kt:12)
       at com.exponea.sdk.util.ExtensionsKt$enqueue$1.onResponse(Extensions.kt:22)
       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)

Exponea SDK versions: v1.1.7 and v2.2.3; both versions uses Paperdb v2.6
Android versions: 4.4.4, 5.1, 8.0.0

Cannot reproduce; error happening to end users.

Fatal Exception: java.lang.IllegalArgumentException in the InAppMessagePresenter

Our app is currently using the 2.9.5 version of the sdk and we are receiving the following crash alerts in Firebase. It's occurring on multiple types of devices as well as different Android OS versions

2021-12-08_22-18-44

Is this something that may have been fixed in a new version of the sdk or something that may have been reported before?

App crashes whenever I start Campaign In app messaging.

Log File is
``
java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Util;
at com.exponea.sdk.util.HtmlNormalizer.asBase64Image(HtmlNormalizer.kt:245)
at com.exponea.sdk.util.HtmlNormalizer.makeImagesToBeOffline(HtmlNormalizer.kt:226)
at com.exponea.sdk.util.HtmlNormalizer.normalize(HtmlNormalizer.kt:81)
at com.exponea.sdk.manager.InAppMessageManagerImpl.show(InAppMessageManagerImpl.kt:302)
at com.exponea.sdk.manager.InAppMessageManagerImpl.showPendingMessage(InAppMessageManagerImpl.kt:211)
at com.exponea.sdk.manager.InAppMessageManagerImpl.access$showPendingMessage(InAppMessageManagerImpl.kt:45)
at com.exponea.sdk.manager.InAppMessageManagerImpl$preloadImageAndShowPending$1$4.invoke(InAppMessageManagerImpl.kt:135)
at com.exponea.sdk.manager.InAppMessageManagerImpl$preloadImageAndShowPending$1$4.invoke(InAppMessageManagerImpl.kt:133)
at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$preload$perImageCallback$1.invoke(InAppMessageBitmapCacheImpl.kt:61)
at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$preload$perImageCallback$1.invoke(InAppMessageBitmapCacheImpl.kt:58)
at com.exponea.sdk.repository.InAppMessageBitmapCacheImpl$downloadImage$1.onResponse(InAppMessageBitmapCacheImpl.kt:97)

Manifest conflicts

When updated from version 3.0.4 to 3.1.0 experiencing merger manifest issue
(Manifest merger failed : Attribute application@fullBackupContent value=(@xml/old_backup_rules) from AndroidManifest.xml:38:9-58
is also present at [com.exponea.sdk:sdk:3.1.0] AndroidManifest.xml:14:9-70 value=(@xml/exponea_default_backup_rules).
Suggestion: add 'tools:replace="android:fullBackupContent"' to element at AndroidManifest.xml:6:5-14:19 to override.)

Apparently, our backup rules cannot be merged with com.exponea.sdk:sdk AndroidManifest backup rules. Do you have any suggestions how to fix the issue? It is a sufficient solution to manually merge these files and add tools:replace="android:fullBackupContent". My proposed solution is to add to our existing rules the exclusion of exponea push token ( "exclude domain="sharedpref" path="EXPONEA_PUSH_TOKEN.xml"" ). Something along the lines of this similar issue AppsFlyerSDK/appsflyer-android-sdk#9 (comment)

App crash: java.lang.NullPointerException Attempt to invoke virtual method 'java.lang.String com.exponea.sdk.models.InAppMessagePayload.getImageUrl()' on a null object reference com.exponea.sdk.manager.InAppMessageManagerImpl.hasImageFor

Hello, Android app crashes, when using Exponea SDK:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.exponea.sdk.models.InAppMessagePayload.getImageUrl()' on a null object reference
       at com.exponea.sdk.manager.InAppMessageManagerImpl.hasImageFor(InAppMessageManagerImpl.java:4)
       at com.exponea.sdk.manager.InAppMessageManagerImpl.getFilteredMessages(InAppMessageManagerImpl.java:124)
       at com.exponea.sdk.manager.InAppMessageManagerImpl.getRandom(InAppMessageManagerImpl.java:10)
       at com.exponea.sdk.manager.InAppMessageManager$DefaultImpls.getRandom$default(InAppMessageManager.java:7)
       at com.exponea.sdk.manager.InAppMessageManagerImpl$showRandom$1.invokeSuspend(InAppMessageManagerImpl.java:31)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:9)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:93)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:14)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:28)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java)

Exponea SDK versions: v2.7.4 and v2.9.0
Android versions: 11, 10, 9, 8
Device: Samsung A51, A50, S10, etc, Nokia 6.1, 7+, etc

Crash occurs when the application is in the background.

Crash with WorkManager version 2.1.0

When updated work manager in our project to version 2.1.0, this crash occurs:

java.lang.NoSuchMethodError: No virtual method setInitialDelay(JLjava/util/concurrent/TimeUnit;)Landroidx/work/OneTimeWorkRequest$Builder; in class Landroidx/work/OneTimeWorkRequest$Builder; or its super classes (declaration of 'androidx.work.OneTimeWorkRequest$Builder' appears in /data/app/com.roadlords.android.debug-2/base.apk)
        at com.exponea.sdk.manager.BackgroundTimerManagerImpl.startTimer(BackgroundTimerManagerImpl.kt:31)
        at com.exponea.sdk.manager.SessionManagerImpl.onSessionEnd(SessionManagerImpl.kt:104)
        at com.exponea.sdk.manager.SessionManager.onActivityPaused(SessionManager.kt:26)
        at android.app.Application.dispatchActivityPaused(Application.java:225)
        at android.app.Activity.onPause(Activity.java:1587)

we are using these work manager related libraries:

implementation "androidx.work:work-runtime-ktx:2.1.0"
implementation "androidx.work:work-rxjava2:2.1.0"

Exponea version we are using is 2.3.1

What's maybe the cause of the problem is that from workmanager version 2.1.0 runtime-ktx requeires Java 8 as is stated here: https://developer.android.com/jetpack/androidx/releases/work#2.1.0

Targeting SDK level 31 causing java.lang.IllegalArgumentException: com.myapp.myapp: Targeting S+

Exponea is using the old version of androidx.work:work-runtime, which is causing IllegalArgumentException app startup, stack trace:

java.lang.IllegalArgumentException: com.myapp.myapp: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
        at android.app.PendingIntent.checkFlags(PendingIntent.java:386)
        at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:657)
        at android.app.PendingIntent.getBroadcast(PendingIntent.java:644)

Please update work-runtime to the latest version (currently 2.7.0-alpha05) to allow targeting Android S.
More details here
Possible workaround is to specify androidx.work:work-runtime:2.7.0-alpha05 to override library version

Use androidX

+--- com.exponea.sdk:sdk:2.8.1
|    +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.61 -> 1.3.72 (*)
|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61 -> 1.3.72 (*)
|    +--- io.paperdb:paperdb:2.6
|    |    +--- com.esotericsoftware:kryo:4.0.1
|    |    |    +--- com.esotericsoftware:reflectasm:1.11.3
|    |    |    |    \--- org.ow2.asm:asm:5.0.4
|    |    |    +--- com.esotericsoftware:minlog:1.3.0
|    |    |    \--- org.objenesis:objenesis:2.5.1 -> 2.6
|    |    \--- de.javakaffee:kryo-serializers:0.40
|    |         \--- com.esotericsoftware:kryo:4.0.0 -> 4.0.1 (*)
|    +--- com.squareup.okhttp3:okhttp:3.12.1 -> 4.7.2 (*)
|    +--- com.google.code.gson:gson:2.8.6
|    +--- org.danilopianini:gson-extras:0.2.2
|    |    +--- com.google.code.gson:gson:2.8.6
|    |    \--- javax.annotation:jsr250-api:1.0
|    +--- com.squareup.okhttp3:logging-interceptor:3.12.1 -> 4.7.2 (*)
|    +--- com.google.firebase:firebase-messaging:20.1.5 -> 20.2.3 (*)
|    +--- androidx.work:work-runtime-ktx:2.3.4
|    |    +--- androidx.work:work-runtime:2.3.4
|    |    |    +--- com.google.guava:listenablefuture:1.0
|    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.2.0 (*)
|    |    |    +--- androidx.room:room-runtime:2.2.3
|    |    |    |    +--- androidx.room:room-common:2.2.3
|    |    |    |    |    \--- androidx.annotation:annotation:1.1.0
|    |    |    |    +--- androidx.sqlite:sqlite-framework:2.0.1 -> 2.1.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    \--- androidx.sqlite:sqlite:2.1.0
|    |    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.sqlite:sqlite:2.0.1 -> 2.1.0 (*)
|    |    |    |    \--- androidx.arch.core:core-runtime:2.0.1 -> 2.1.0 (*)
|    |    |    +--- androidx.sqlite:sqlite:2.1.0 (*)
|    |    |    +--- androidx.sqlite:sqlite-framework:2.1.0 (*)
|    |    |    +--- androidx.core:core:1.1.0 -> 1.3.0 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-service:2.1.0 -> 2.2.0 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.60 -> 1.3.72 (*)
|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0
|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.3.72 (*)
|    |         \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0
|    |              +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.3.72 (*)
|    |              \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50 -> 1.3.72
|    +--- com.android.support.constraint:constraint-layout:1.1.3 <-----------------------------------------
|    |    \--- com.android.support.constraint:constraint-layout-solver:1.1.3
|    \--- com.google.android.material:material:1.1.0 (*)

Exponea sdk je posledna kniznica v nasom projekte ktora nepouziva androidx, a musime mat kvoli tomu zapnuty jetifier, a to spomaluje buildy

Fyi, aj prechod na moshi z gsonu by potesil

Setting Push Icon color is not working

Dear Team,

Thanks for the SDK. below is the configuration in my MainApplication.java. I am able to see the Push Icon in the notification section on the android device. But it's always dark gray color.

Please let me know what I have missed in this.

    configuration.setAutomaticSessionTracking(true);
    configuration.setAutomaticPushNotification(true);
    configuration.setPushChannelName("HelloWorld");
    configuration.setPushChannelDescription("HelloWorld Notifications");
    configuration.setPushChannelId("0");
    configuration.setPushIcon(R.drawable.ic_red);
    configuration.setPushAccentColor(R.color.dark_red);
    configuration.setPushNotificationImportance(NotificationManager.IMPORTANCE_DEFAULT);
    configuration.setTokenTrackFrequency(ExponeaConfiguration.TokenFrequency.ON_TOKEN_CHANGE);

Tracking on main thread

Zdravim,
I noticed strictmode complains about SQL inserts on main thread

2022-02-01 00:03:55.684 14685-14685/sk.o2.radost.mock D/StrictMode: StrictMode policy violation; ~duration=20 ms: android.os.strictmode.DiskWriteViolation
        at android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk(StrictMode.java:1615)
        at android.database.sqlite.SQLiteConnection.applyBlockGuardPolicy(SQLiteConnection.java:1201)
        at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:937)
        at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)
        at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:89)
        at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.java:51)
        at androidx.room.EntityInsertionAdapter.insert(EntityInsertionAdapter.java:64)
        at com.exponea.sdk.database.ExportedEventDao_Impl.add(ExportedEventDao_Impl.java:202)
        at com.exponea.sdk.database.ExponeaDatabase.add(ExponeaDatabase.kt:21)
        at com.exponea.sdk.repository.EventRepositoryImpl.add(EventRepositoryImpl.kt:36)
        at com.exponea.sdk.manager.EventManagerImpl.addEventToQueue(EventManagerImpl.kt:51)
        at com.exponea.sdk.manager.EventManagerImpl.track(EventManagerImpl.kt:77)
        at com.exponea.sdk.Exponea$trackEvent$1$1.invoke(Exponea.kt:334)
        at com.exponea.sdk.Exponea$trackEvent$1$1.invoke(Exponea.kt:333)
        at com.exponea.sdk.Exponea.requireInitialized$sdk_release(Exponea.kt:598)
        at com.exponea.sdk.Exponea.requireInitialized(Exponea.kt:603)
        at com.exponea.sdk.Exponea.requireInitialized$default(Exponea.kt:602)
        at com.exponea.sdk.Exponea.trackEvent(Exponea.kt:333)
        at sk.o2.analytics.exponea.tracker.ExponeaAnalyticsTracker.trackEvent(ExponeaAnalyticsTracker.kt:78)
        at sk.o2.analytics.exponea.tracker.ExponeaAnalyticsTracker.trackScreenView(ExponeaAnalyticsTracker.kt:64)
        at sk.o2.analytics.Analytics.trackScreenView(Analytics.kt:18)
        at sk.o2.conductor.ViewBindingController.onViewCreated(ViewBindingController.kt:51)
        at sk.o2.conductor.ViewBindingController.onCreateView(ViewBindingController.kt:42)
        at sk.o2.conductor.BaseController.onCreateView(BaseController.kt:42)

Which happens for example when we track screen views, which is not great.

Should I move the Exponea.trackEvent to IO thread, or will the library implement this eventually?
I could just post it to IO dispatcher in coroutines, but then I'd risk getting stuff out of order, so probably a queue is necessary, which I think should be the library responsibility

Push notification to open app not working

Installed exponea sdk. Initialized it in my application. I'm able to receive push notifications using exponea web interface.

  1. I create a scenario -> create action Mobile Push Notification
{
    "title": "Have a nice day!",
    "action": "app"
}
  1. choose my email in "preview for"
  2. click Test push notification
  3. click send
  4. Tap on the notification.
    Expectation: app open
    Reality: notification disappeared, the app not opened

Using other "actions" ("browser" with url or "deeplink" with url) works fine.

Environment:
"device_model":"SM-N950F"
"os_version":"9"
"sdk_version":"2.7.1"
"os_name":"Android"

Unfotinuatly, I can't try another device. I tried to use an emulator, but it ain't receive a push notification (don't know the exact reason, but it's not the point).

In App Messaging still shows in device even if it was stopped in Dashboard

Hi,

I have this issue wherein the in app messaging still shows even if I stop it on Dashboard.
I am just using this code for sending a track event
val properties = PropertiesList(hashMapOf(Pair("custom_event", true))) // Track the event. Exponea.trackEvent( properties = properties, timestamp = null, eventType = "event type here" )

I also initialized the SDK on my Application class.

I think there is some cache happening in SDK. Can I clear it on logout or closing of my app? What is the function name for that?

I can't also fetch the new UI in case I edit it on dashboard (Let say I change the banner title or image body). To fetch it, I need to uninstall/reinstall or clear data the application.

I also observe that if you need to delete/ reinstall the app to stop the in app dialog from showing.

Feature request - configuration to set color of push notification icon

As a feature request, I would like to be able to set a custom push notification icon color. I think this would probably be easiest as a value in the configuration object, e.g.

pushIconColor : Int?

This could then feed directly into NotificationCompat.Builder used in your FcmManagerImpl class.

(I understand the same effect can be achieved by using a drawable icon that already has a color, but I think what I'm suggesting is more configurable.)

Notification sound rings twice in some devices

I have configured notification sound in the mobile push and added a similar named .wav file in my raw folder of android app. However in certain devices the notification sound is heard twice when a notification comes from exponea.

Devices: Asus Zenfone Max Pro M2, Samsung Galaxy S8

Share OkHttp instance with rest of the app

internal class NetworkHandlerImpl(private var exponeaConfiguration: ExponeaConfiguration) : NetworkHandler {
   private fun setupNetworkClient() {
        val networkInterceptor = getNetworkInterceptor()

        networkClient = OkHttpClient.Builder()
                .addInterceptor(getNetworkLogger())
                .addInterceptor(networkInterceptor)
                .build()
    }

90% aplikacii pouziva Okhttp, instanciu by malo byt mozne injectnut cez ExponeaConfiguration, zbytocne duplikujete threadpool vytvaranim vlastnej

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.