Coder Social home page Coder Social logo

apptentive-android's People

Stargazers

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

Watchers

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

apptentive-android's Issues

Database Lock in ApptentiveDatabase.deletePayload

Stack trace:
android.database.sqlite.SQLiteException: database is locked
at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:2005)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:905)
at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:995)
at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:988)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:593)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)
at com.apptentive.android.sdk.storage.ApptentiveDatabase.deletePayload(ApptentiveDatabase.java:150)
at com.apptentive.android.sdk.storage.PayloadSendWorker$PayloadRunner.run(PayloadSendWorker.java:101)
Host: ip-10-170-1-174 Name: /home/ec2-user/web/logs/application.log Category: Grocery/Application

ClassNotFoundException NetworkStateReceiver

This crash appears on google play very often

Devices: Galaxy Exhibit, Galaxy S3 (m0), Galaxy Note 10.1 (p4noterf), nuclear-n01, nuclear-inet.
Android 4.+

java.lang.RuntimeException: Unable to instantiate receiver com.apptentive.android.sdk.comm.NetworkStateReceiver: java.lang.ClassNotFoundException: com.apptentive.android.sdk.comm.NetworkStateReceiver
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2243)
at android.app.ActivityThread.access$1600(ActivityThread.java:134)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4867)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.apptentive.android.sdk.comm.NetworkStateReceiver
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2238)
... 10 more

Why Activity instead of Context?

Not entirely sure where to post questions, decided this might be a good place.

Why does Apptentive.engage take in Activity as an argument vs taking in Context? Going down the chain, the Activity/Context continually gets passed around, and the only places it's used only require Context as an argument. If someone could shed some light on this, that would be great.

The feedback module allows "empty" messages

The FeedbackModule in Line 202 only checks whether the entered text is an empty string. So basically I could enter send " " as Feedback. Maybe you could use
text.replace( " ", "" ).equals("") instead and introduce a minimum Feedback length parameter.

Sample app crashes on startup

play-services-gcm is out of date - this should be updated to 10.0.1 for push notifications to work.

This also requires updating the classpath dependency to 3.0.0, i.e. com.google.gms:google-services:3.0.0

Apptentive crashes if there's nothing entered in a feedback box.

This is a bug in Apptentive for Android v1.4.2.

To reproduce it:

    1. Tap on No button when message "Do you love <MyApp>?" alert appears
    2. Tap on the Send button without input anything

This is the crash log:

05-20 09:14:21.495: E/AndroidRuntime(9692): FATAL EXCEPTION: main
05-20 09:14:21.495: E/AndroidRuntime(9692): java.lang.NullPointerException
05-20 09:14:21.495: E/AndroidRuntime(9692): at com.apptentive.android.sdk.module.engagement.interaction.view.FeedbackDialogInteractionView.sendMessage(FeedbackDialogInteractionView.java:292)
05-20 09:14:21.495: E/AndroidRuntime(9692): at com.apptentive.android.sdk.module.engagement.interaction.view.FeedbackDialogInteractionView.access$400(FeedbackDialogInteractionView.java:34)
05-20 09:14:21.495: E/AndroidRuntime(9692): at com.apptentive.android.sdk.module.engagement.interaction.view.FeedbackDialogInteractionView$5.onClick(FeedbackDialogInteractionView.java:186)
05-20 09:14:21.495: E/AndroidRuntime(9692): at android.view.View.performClick(View.java:4476)
05-20 09:14:21.495: E/AndroidRuntime(9692): at android.view.View$PerformClick.run(View.java:18795)
05-20 09:14:21.495: E/AndroidRuntime(9692): at android.os.Handler.handleCallback(Handler.java:730)
05-20 09:14:21.495: E/AndroidRuntime(9692): at android.os.Handler.dispatchMessage(Handler.java:92)
05-20 09:14:21.495: E/AndroidRuntime(9692): at android.os.Looper.loop(Looper.java:176)
05-20 09:14:21.495: E/AndroidRuntime(9692): at android.app.ActivityThread.main(ActivityThread.java:5493)
05-20 09:14:21.495: E/AndroidRuntime(9692): at java.lang.reflect.Method.invokeNative(Native Method)
05-20 09:14:21.495: E/AndroidRuntime(9692): at java.lang.reflect.Method.invoke(Method.java:525)
05-20 09:14:21.495: E/AndroidRuntime(9692): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
05-20 09:14:21.495: E/AndroidRuntime(9692): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1041)
05-20 09:14:21.495: E/AndroidRuntime(9692): at dalvik.system.NativeStart.main(Native Method)

On orientation change rating dialog disappears

Once the app met the significant event conditions it shows the rating dialog but on orientation change in the same view it disappears.

Could you please handle the orientation changes, Or expose a method to show the corresponding dialog.

Rating prompt not showing with sample app.

When creating an account and trying to show a rating prompt with the sample app the rating is never shown.

This appears to be due to the code_point/rating_dialog.remind/last_invoked_at/total failing in the evaluation.

How do we set this? It doesn't seem to be on the rating dialog form.

01-27 12:32:11.905 3787-3787/com.apptentive.android.example V/Apptentive: - code_point/rating_dialog.remind/last_invoked_at/total
01-27 12:32:21.348 3787-3787/com.apptentive.android.example V/Apptentive: - null $before BigDecimal(-86400)?
01-27 12:32:27.961 3787-3787/com.apptentive.android.example V/Apptentive: - => false

error inflating FloatingActionButton after updating support library to 24.2.0

E/UncaughtException(7190): android.view.InflateException: Binary XML file line #23: Error inflating class android.support.design.widget.FloatingActionButton
E/UncaughtException(7190): at android.view.LayoutInflater.createView(LayoutInflater.java:613)
E/UncaughtException(7190): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
E/UncaughtException(7190): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
E/UncaughtException(7190): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
E/UncaughtException(7190): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
E/UncaughtException(7190): at com.apptentive.android.sdk.module.engagement.interaction.fragment.MessageCenterFragment.onCreateView(MessageCenterFragment.java:219)

apptentive sdk version: 3.2.1
project compileSdkVersion 24
project minSdkVersion 14
project targetSdkVersion 22

Using project with android studio

I understand this is officially not supported.
However, I build a project with ant, then add jar as a dependency to my Gradle build.

When I invoke a message centre from my app, I get this exception

    java.lang.NoClassDefFoundError: com.apptentive.android.sdk.R$string
            at com.apptentive.android.sdk.model.AutomatedMessage.createWelcomeMessage(AutomatedMessage.java:56)
            at com.apptentive.android.sdk.module.messagecenter.MessageManager.createMessageCenterAutoMessage(MessageManager.java:209)
            at com.apptentive.android.sdk.Apptentive.showMessageCenter(Apptentive.java:636)
            at com.apptentive.android.sdk.Apptentive.showMessageCenter(Apptentive.java:291)

Do I miss anything?

E/Apptentive: java.lang.NumberFormatException

When start my application, log cat show me stack trace: https://gist.github.com/GlebMaltsev/7e94f3fbc3210f19c84ebd5da5cb860c

This error not crash my app, but seems that it broke some logic in Apptentive. I use Apptentive v3.2.2.

I think the reason of it that you try to parse app version name as sequence of long separated numbers. For current stack trace i use versionName "0.1.4" in default config. BUT also i have versionNameSuffix "-DEBUG" for debug build type and versionNameSuffix "-QA" for qa flavor. Total version name returned by BuildConfig.VERSION_NAME when i assemble qa debug build is "0.1.4-QA-DEBUG".

NullPointerException at MessageCenterComposingView.addImagesToImageAttachmentBand(java.util.List)

Hello. I have crash on both 3.0.0 and 3.2.2 versions of apptentive SDK. Reproduced 10/10 on Samsung Galaxy Note 3 Android 5.0 any device.

Steps to reproduce:

  1. Switch off the internet connection Switch on "Do not keep activities" in developer options.
  2. Open apptentive activity (Apptentive.showMessageCenter(getActivity())).
  3. Press "add new message" button in right bottom corner (or use showing form if you never send message before).
  4. Click "add attachment" button and switch any picture - crash will appear:

java.lang.RuntimeException: Unable to resume activity {com.spritzr/com.apptentive.android.sdk.ApptentiveViewActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65546, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:2314 flg=0x43 }} to activity {com.spritzr/com.apptentive.android.sdk.ApptentiveViewActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.apptentive.android.sdk.module.messagecenter.view.MessageCenterComposingView.addImagesToImageAttachmentBand(java.util.List)' on a null object reference

Click to see full stacktrace

Thanks!

[UPDATED] I discover that the real reason of appearance of this bug is killing an activity in background. I edit issue description above.

Null pointer exception when open MessageCenter after close and reopen the app.

Full stacktrace:

Process: net.taringa.mobile.debug, PID: 32589
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setVisibility(int)' on a null object reference
at com.apptentive.android.sdk.module.messagecenter.view.holder.IncomingTextMessageHolder.updateMessage(IncomingTextMessageHolder.java:44)
at com.apptentive.android.sdk.module.messagecenter.view.MessageAdapter.getView(MessageAdapter.java:314)
at android.widget.AbsListView.obtainView(AbsListView.java:2346)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1280)
at android.widget.ListView.onMeasure(ListView.java:1188)
at android.view.View.measure(View.java:18788)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:18788)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:901)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.View.measure(View.java:18788)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.View.measure(View.java:18788)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
at android.view.View.measure(View.java:18788)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
at android.view.View.measure(View.java:18788)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.View.measure(View.java:18788)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:18788)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
at android.view.View.measure(View.java:18788)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2643)
at android.view.View.measure(View.java:18788)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2100)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1216)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1452)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Apptentive dialog disappears on screen rotation

When the user has the rating dialog open, if they rotate the device, the dialog disappears.

Seems to be device specific (can only reproduce on some phones).
Tested On : Samsung Galaxy Grand 2 (Android v4.3)
Using Apptentive for Android v1.4.2

Database lock in getOldestUnsentPayload

I'm seeing this crash in the logs for my app (so far there are about 60 crashes per week from this).

Is there a reason you don't catch the exception here?

https://github.com/apptentive/apptentive-android/blob/master/apptentive-android-sdk/src/com/apptentive/android/sdk/storage/ApptentiveDatabase.java#L206

Because I feel that a library like this shouldn't really be letting internal exceptions be thrown that crash the app.

Crashed Thread
android.database.sqlite.SQLiteException: not an error (code 0): Could not open the database in read/write mode.
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:318)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:229)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:515)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:207)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:178)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:875)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:843)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:1145)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:236)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:224)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.apptentive.android.sdk.storage.ApptentiveDatabase.getOldestUnsentPayload(ApptentiveDatabase.java:207)
at com.apptentive.android.sdk.storage.PayloadSendWorker$PayloadRunner.run(PayloadSendWorker.java:57)

Getting error Style Resource definition cycle

Getting this error at time of making Sing APK

Error: Style Resource definition cycle: ApptentiveHeader => ApptentiveHeader.Plain => ApptentiveHeader [ResourceCycle]
Error: Style Resource definition cycle: ApptentiveHeaderText => ApptentiveHeaderText.Plain => ApptentiveHeaderText.Default => ApptentiveHeaderText [ResourceCycle]
Error: Style Resource definition cycle: ApptentiveMainArea => ApptentiveMainArea.Plain => ApptentiveMainArea [ResourceCycle]
Error: Style Resource definition cycle: ApptentiveMessageCenterDrawer => ApptentiveMessageCenterDrawer.Plain => ApptentiveMessageCenterDrawer [ResourceCycle]

Apptentive Internet Connection Issue?

Upgraded to Android sdk v2.0.1 today. For some reason when I get to the Message Center I am getting the message "Please connect to the internet to send feedback", even though I clearly have internet access. I am using..

compileSdkVersion 23
buildToolsVersion '23.0.1'
minSdkVersion 16
targetSdkVersion 23

NullPointerException at Util.getThemeColor(Util.java:472)

Hello. Is it known issue? (Android 4.3)

Fatal Exception: java.lang.NullPointerException at com.apptentive.android.sdk.util.Util.getThemeColor(Util.java:472) at com.apptentive.android.sdk.module.engagement.interaction.fragment.ApptentiveBaseFragment.onViewCreated(ApptentiveBaseFragment.java:268) at com.apptentive.android.sdk.module.engagement.interaction.fragment.MessageCenterFragment.onViewCreated(MessageCenterFragment.java:227)

Click to see full stacktrace

Attach files

There is not the option to attach files in message center.

Can't Use Apptentive with Design Support Library

When I try to use Apptentive 2.0.0 with the Android Design Support Library I get the following error message when I try to build my project.

Error:(2) Attribute "borderWidth" has already been defined

Transparent survey header on some devices

The title of the survey has a transparent background on some devices, this happens on surveys that have many questions. The example had 16 questions.

This is how the survey should look on all devices
screen shot 2015-09-25 at 14 35 52
screen shot 2015-09-25 at 14 36 25

This is how it looks on some devices

screenshot_2015-09-25-14-27-56
screenshot_2015-09-25-14-28-07

Message center doesn't support russian characters

Tested on 2.1.1.
Send some message with russian characters, close activity, open again and you will see:
image
Take this string for testing: "что за хуйня пацаны, надо фиксить"

Only Enable NetworkStateReceiver When Needed

Requiring apps that use your SDK to have a BroadcastReceiver that listens to connectivity changes is a bad idea. See http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html. Connectivity changes happen extremely frequently. If you really need this then only have it enabled when it is needed and then disable it when you don't need it anymore. See http://developer.android.com/training/monitoring-device-state/manifest-receivers.html on how to do this.

For example you could enabled it when someone adds a NetworkStateListener in NetworkStateReceiver.addListener and then disable it when NetworkStateReceiver. clearListeners is called. Users of the SDK can then add android:enabled="false" to the receiver declaration in AndroidManifest.xml

This is causing our app to be started very frequently. Right now we are having an issue with crashlytics crashing on app startup and since this is causing our app to startup very frequently people are complaining that our app is crashing all the time. Please fix this.

ratings module not showing up

I debugged and narrowed it down to this line in RatingModule.java:

boolean canShow = canShowRatingFlow(prefs);

The canShow is always False even when conditions are met. Can you please look into it?

NPE at ViewActivity onCreate

Hello,

I'm using the Apptentive android sdk. Current checkout is: origin/compress_images (28th Febr.)
In the last commit I added the Apptentive rating dialog to my Main activity

onResume() {
...
Apptentive.showRatingFlowIfConditionsAreMet(this);
...
}

I'm also using the message centre (it was added long ago and there were no exceptions before)

And I got the following error stacktrace from a user:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lagom.runtroll/com.apptentive.android.sdk.ViewActivity}: java.lang.NullPointerException: enumType == null || name == null
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1661)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1677)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException: enumType == null || name == null
at java.lang.Enum.valueOf(Enum.java:166)
at com.apptentive.android.sdk.module.ActivityContent$Type.valueOf(ActivityContent.java:1)
at com.apptentive.android.sdk.module.ActivityContent$Type.parse(ActivityContent.java:34)
at com.apptentive.android.sdk.ViewActivity.onCreate(ViewActivity.java:38)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1073)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1625)
... 11 more

The user is on Android 2.3.4 (no device details)

Apptentive Message Center breaks on language change

Going into the message center I see the following...

screen shot 2015-12-15 at 4 35 39 pm

If I then change the language on the device to anything else (tested with a few different), I get nothing but the following...

screen shot 2015-12-15 at 4 38 15 pm

I've tried exiting, restarting, waiting, etc but this page won't load. Switching back to English immediately solves this. I've tried on version 2.0.1 and 2.1.0 and its happening on both. Let me know if this is potentially an account setting somewhere (I couldn't find one). Thanks

Why do you require multidex to be enabled?

Why does apptentive-android enable multiDex = true inside the build.gradle (https://github.com/apptentive/apptentive-android/blob/master/apptentive/build.gradle#L26)?

Native multidex support was only added Android Lollipop. Prior versions of Android require the com.android.support:multidex library to make multidex work, which is added as transitive dependency. The multidex support library has its own share of limitations: https://developer.android.com/studio/build/multidex.html#limitations

Does Apptentive really require multidex support? To me this seems like an unnecessary addition (that is pushed to the implementing app).

Use apply() instead of commit() when using SharedPreferences.Editor

I noticed that when you are editing SharedPreferences you are using commit() In our tests commit takes about 10 milliseconds to write the changes to disk. You should probably use apply() instead of commit(). apply() writes the changes to disk asynchronously. The javadoc for commit() states the following:

If you don't care about the return value and you're using this from your application's main thread, consider using apply() instead.

Attribute "track" already defined

I'm using:
compile 'com.apptentive:apptentive-android:2.0.1@aar'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'

Apptentive GCM notification behaving differently when app is in background.

When Apptentive GCM integration is enabled, and app is in background, app's GCM listener is not getting called.

I integrated my android app with apptentive as per GCM instructions in https://docs.apptentive.com/android/integration/

When I reply to a message from apptentive web UI, I am observing two notification behaviors at app side.

When app is opened, my own GCM listener is getting called. When app is not in opened state, my own GCM listener is not getting called, however I am seeing a notification with app's default icon, "You have a new message" " ".

I am not sure who is creating this new/unwanted notification. It is causing problem because, clicking this new notification is taking user to my activity, but not opening message center.

Sdk version is 2.1.3
Device running Android 5.1.1

Message read status does not seem to be working

I've integrated apptentive using the steps provided in the Readme. Specifically I am hooking into my activity lifecycle using delegation. I'm never receiving events of new unread messages via the setUnreadMessagesListener on the client. Also, I noticed that viewing the messages via the website that all of the users messages are marked as unread even though I've viewed them in the message center.

Allow hiding the email field from the end user if we already know it

Please create an option is hide the email field (like on the iOS library) if we already know what it is.

Currently the code will only pre-populate the field but will continue to show it unless the user enters this themselves.

Below is the snippet from the library that controls this logic:

String personEnteredEmail = PersonManager.loadPersonEmail(activity);
String personInitialEmail = PersonManager.loadInitialPersonEmail(activity);
if (Util.isEmpty(personEnteredEmail)) {
    if (!Util.isEmpty(personInitialEmail)) {
        dialog.setEmailFieldHidden(false);
        dialog.prePopulateEmail(personInitialEmail);
    }
} else {
    dialog.setEmailFieldHidden(true);
}

Few crashes causing issues lately

Hi, I have been using Apptentive SDK from long time in my app. Lately I am facing two crashes with v2.0.1. And its affecting quiet a good number of users. I am pasting the error log of both the crashes below. Any help would be appreciated.

Issue 1 :

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.app.Activity.getSharedPreferences(java.lang.String, int)' on a null object reference
at com.apptentive.android.sdk.module.messagecenter.view.MessageCenterActivityContent.saveOrClearPendingComposingMessage(MessageCenterActivityContent.java:1080)
at com.apptentive.android.sdk.module.messagecenter.view.MessageCenterActivityContent.cleanup(MessageCenterActivityContent.java:474)
at com.apptentive.android.sdk.module.messagecenter.view.MessageCenterActivityContent.onBackPressed(MessageCenterActivityContent.java:468)
at com.apptentive.android.sdk.ViewActivity.onBackPressed(ViewActivity.java:280)
at android.app.Activity.onKeyUp(Activity.java:2466)
at android.view.KeyEvent.dispatch(KeyEvent.java:2656)
at android.app.Activity.dispatchKeyEvent(Activity.java:2717)
at android.support.v7.internal.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:50)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:224)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2276)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4090)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4052)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3604)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3657)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3623)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3740)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3631)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3797)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3604)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3657)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3623)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3631)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3604)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3657)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3623)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3773)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3934)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2283)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1924)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1915)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2260)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

Issue 2 :

java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Parcelable android.widget.ListView.onSaveInstanceState()' on a null object reference
at com.apptentive.android.sdk.module.messagecenter.view.MessageCenterActivityContent.onSaveInstanceState(MessageCenterActivityContent.java:448)
at com.apptentive.android.sdk.ViewActivity.onSaveInstanceState(ViewActivity.java:333)
at android.app.Activity.performSaveInstanceState(Activity.java:1297)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1272)
at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:3952)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3363)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:3419)
at android.app.ActivityThread.access$1200(ActivityThread.java:147)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1325)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)

Hide all Apptentive branding does not work with Apptentive 2.0.1

In message center there is an INFO button that opens a dialog with Apptentive information.

Looking trough the Apptentive source code it appears this button is always displayed.
This should be put behind a check that makes sure it will not appear when "Hide all Apptentive branding" is enabled.

Taking into consideration that you need to pay for this feature, it's kind of a rip off.

Wrong project mentioned in CONTRIBUTING.md

"We love contributions!

Any contributions to the master apptentive-ios project must sign..."

should be

"We love contributions!

Any contributions to the master apptentive-android project must sign..."

Compose Message Loses Focus with Apptentive 3.2.1 on Android 4.4.2 devices

In Message Center, when I touch the message body to enter a message, it immediately loses focus every time I touch the message body area. This only happens on Android 4.4.2 devices (I've tried an LG G2 and Droid Razr Maxx). It works on my Nexus 6 running Android 5.0.1. The same behavior occurs in Apptentive 3.2.0 and 3.2.1.

Lint Error for ResourceCycle

Because Android allows for inheritance of styles without specifying the parent attribute, specifying the parent of ApptentiveHeader as ApptentiveHeader.Plain, etc. creates a resource cycle that Lint doesn't like.

Error: Style Resource definition cycle: ApptentiveHeader => ApptentiveHeader.Plain => ApptentiveHeader [ResourceCycle]
Error: Style Resource definition cycle: ApptentiveHeaderText => ApptentiveHeaderText.Plain => ApptentiveHeaderText.Default => ApptentiveHeaderText [ResourceCycle]
Error: Style Resource definition cycle: ApptentiveMainArea => ApptentiveMainArea.Plain => ApptentiveMainArea [ResourceCycle]
Error: Style Resource definition cycle: ApptentiveMessageCenterDrawer => ApptentiveMessageCenterDrawer.Plain => ApptentiveMessageCenterDrawer [ResourceCycle]

showMessageCenter(Activity) gives message with 'null' instead of app name

Greetings!
Love your work.
I do have a problem though.

When my users click on a button I call the showMessageCenter(MyActivity.this);, and if it's their first time clicking it a dialog pops up and says "Thanks for your feedback! Please let us know how to make null better for you!"

Once they enter some text and Send, they go straight to the messaging activity upon consecutive button presses, but on that first click I don't know why it is saying 'null' instead of my app name.

Thanks in advance for your help.

Fatal Exception: java.lang.NullPointerException on MessageAdapter.java line 376

I'm using v3.1.1 and just saw this crash from one of our users:

Date: 2016-07-07T13:51:31Z
OS Version: 4.4.2
Device: XL-103Q
RAM Free: 10.2%
Disk Free: 35.9%

Fatal Exception: java.lang.NullPointerException
       at com.apptentive.android.sdk.module.messagecenter.view.MessageAdapter$1.run(MessageAdapter.java:376)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5372)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:970)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:786)
       at dalvik.system.NativeStart.main(NativeStart.java)

Is this a known issue?

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.