Giter VIP home page Giter VIP logo

hotline-android's Introduction

Hotline Android SDK - Release

Twitter

Quick Steps

Project gradle file build.gradle

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

App Module gradle file (app/build.gradle) GitHub version

dependencies {
    compile 'com.github.freshdesk:hotline-android:{latestVersion}'
}

hotline-android's People

Contributors

muthufd avatar tryprasannan avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hotline-android's Issues

Proguard rule is too greedy

Used proguard rule basically keeps the complete SDK, ideally we don't to keep the full SDK, this is increasing our method counts

-keep class com.freshdesk.hotline.** { *; }
-keep class com.demach.konotor.** { *; }

requesting audio permission - how to remove

as you know on older devices of android the audio permission will be shown on the play store when user downloads the app. on newer devices it will be requested at run time. i dont need this permissions but i'd like it removed from the manifest so users are not intimidated to download my app based on the need of an audio permission. how can i do this ? do you have a sdk without this feature perhaps ? if i remove the need for audio does it remove the permssion from the manfiest also ?

Crashing when clicked on conversations

On Version 1.2.3 with custom theme, when clicked on channel to see a conversation the following crash occurs [Device version 7.0].

06-14 11:38:21.824  9157  9157 D AndroidRuntime: Shutting down VM
06-14 11:38:21.839  9157  9157 E AndroidRuntime: FATAL EXCEPTION: main
06-14 11:38:21.839  9157  9157 E AndroidRuntime: Process: com.practo.fabric, PID: 9157
06-14 11:38:21.839  9157  9157 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.practo.fabric/com.freshdesk.hotline.activity.ConversationDetailActivity}: android.view.InflateException: Binary XML file line #31: Binary XML file line #7: Error inflating class ImageView
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6077)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #31: Binary XML file line #7: Error inflating class ImageView
06-14 11:38:21.839  9157  9157 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class ImageView
06-14 11:38:21.839  9157  9157 E AndroidRuntime: Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f010009 a=-1}
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.content.res.TypedArray.getDrawable(TypedArray.java:925)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.View.<init>(View.java:4175)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.widget.ImageView.<init>(ImageView.java:150)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.widget.ImageView.<init>(ImageView.java:145)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:60)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:56)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1029)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1087)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:47)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.parseInclude(LayoutInflater.java:994)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:854)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at com.freshdesk.hotline.activity.ConversationDetailActivity.onCreate(Unknown Source)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6662)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6077)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
06-14 11:38:21.839  9157  9157 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
06-14 11:38:21.847  1609  2194 W ActivityManager:   Force finishing activity com.practo.fabric/com.freshdesk.hotline.activity.ConversationDetailActivity
06-14 11:38:21.858  1609  2194 W ActivityManager:   Force finishing activity com.practo.fabric/com.freshdesk.hotline.activity.ChannelListActivity```

Icons not following MaterialDesign spec

ImageView size needs to be 48dp and padding needs to 12dp. So the resultant icon size is 24dp. This is not a hard rule like every thing in the Material Spec, but it looks way better that way.

Allow .setLargeIcon(Bitmap bitmap) for HotlineNotificationConfig

HotlineNotificationConfig's .setLargeIcon(@DrawableRes int largeIconResId) accepts Drawable Res only. This way its not possible to set vectorDrawables as large icons.

If you could allow .setLargeIcon(Bitmap bitmap) then vectorDrawables can be resolved to Bitmap and be passed here.

Proguard error in 1.0.12

TLDR

add -dontwarn uk.co.chrishenx.calligraphy.** in your proguard rules

and change your README guide to use fixed version rather than 1.0.+

What happened

Pulled the develop branch BUILD FAILED

ARRGGHHH some proguard sh*t

Try adding some extra rules for updated libraries like auto value

Lot of Googling about auto value proguard rules

ARRGHH this proguard!!!

More googling. Nothing seems to work

Pulled the master (the version in the playstore) BUILD FAILED

WHAT!!! HOW!!!

Checked warnings from dynamic dependencies and figured it out.

Moral of the story

Don't use dynamic dependencies. Lesson learnt the hard way

CONNECTIVITY_CHANGE implicit broadcast

If you target API level 27 there is restriction on implicit broadcast. Since HotlineNetworkChangeReceiver listen for connectivity change this won't work if SDK consumer target to API level 27. Any plan to handle this ?

File URI exposed exception

I have integrated hotline in my application but it is randomely crashing at this point

logs--
android.os.FileUriExposedException:
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799)
at android.net.Uri.checkFileUriExposed(Uri.java:2346)
at android.content.ClipData.prepareToLeaveProcess(ClipData.java:832)
at android.content.Intent.prepareToLeaveProcess(Intent.java:8948)
at android.content.Intent.prepareToLeaveProcess(Intent.java:8933)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1519)
at android.app.Activity.startActivityForResult(Activity.java:4317)
at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:48)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:75)
at android.app.Activity.startActivityForResult(Activity.java:4276)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:856)
at com.freshdesk.hotline.activity.ConversationDetailActivity.aK(Unknown Source:0)
at com.freshdesk.hotline.activity.ConversationDetailActivity.d(Unknown Source:0)
at com.freshdesk.hotline.activity.af.onClick(Unknown Source:0)
at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1119)
at android.widget.AdapterView.performItemClick(AdapterView.java:310)
at android.widget.AbsListView.performItemClick(AbsListView.java:1202)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3189)
at android.widget.AbsListView$3.run(AbsListView.java:4243)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6317)
at java.lang.reflect.Method.invoke(Native Method:0)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)

Cannot resolve classes in v1.2.1

In v1.2.1, the following classes cannot be resolved:

import com.freshdesk.hotline.FaqOptions;
import com.freshdesk.hotline.Hotline;

ChannelListActivity shown before Chat Screen (ConversationDetailActivity)

The first time the user opens the chat screen, "ChannelListActivity" is launched and then after a few seconds the actual chat screen ("ConversationDetailActivity") is launched. Subsequently, the chat screen is launched directly.

zophop_hotline

We launch the screen by calling : Hotline.showConversations(activity);

Is this the expected behaviour? Is there anything we can do to change this and make sure chat screen opens directly even for the first time?

HotlineComponentNotFoundException

I am getting the following exception frequently

Caused by com.freshdesk.hotline.exception.HotlineComponentNotFoundException: Component of Hotline SDK not found in your app's AndroidManifest.xml + (com.freshdesk.hotline.receiver.HotlineReceiver missing!) at com.freshdesk.hotline.util.o.L(Unknown Source) at com.freshdesk.hotline.Hotline.init(Unknown Source)

I have added your proguard configuration as mentioned in the docs. What am I missing here?

Crashing in lolipop and lesser with latest appcompatv7 library

Hi,

My project is integrated with hotline sdk and facebook sdk.
Recently I upgraded my facebook sdk , which requires appcompatv7 version 25+.
When i use this version of appcompat v7, hotline sdk crashes for android versions lolipop and lesser.
Trace is added below:
Reason is explained in this link.
Looks like need a fix in hotline sdk.

Crash Trace:

`E/AndroidRuntime( 2632): FATAL EXCEPTION: main

E/AndroidRuntime( 2632): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.testapp/com.freshdesk.hotline.activity.CategoryListActivity}: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020052

E/AndroidRuntime( 2632): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)

E/AndroidRuntime( 2632): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)

E/AndroidRuntime( 2632): at android.app.ActivityThread.access$600(ActivityThread.java:140)

E/AndroidRuntime( 2632): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)

E/AndroidRuntime( 2632): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 2632): at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 2632): at android.app.ActivityThread.main(ActivityThread.java:4895)

E/AndroidRuntime( 2632): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2632): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 2632): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)

E/AndroidRuntime( 2632): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)

E/AndroidRuntime( 2632): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 2632): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020052

E/AndroidRuntime( 2632): at android.content.res.Resources.loadDrawable(Resources.java:1951)

E/AndroidRuntime( 2632): at android.content.res.Resources.getDrawable(Resources.java:672)

E/AndroidRuntime( 2632): at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)

E/AndroidRuntime( 2632): at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:202)

E/AndroidRuntime( 2632): at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)

E/AndroidRuntime( 2632): at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:711)

E/AndroidRuntime( 2632): at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)

E/AndroidRuntime( 2632): at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatDelegateImplBase.(AppCompatDelegateImplBase.java:131)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatDelegateImplV9.(AppCompatDelegateImplV9.java:155)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatDelegateImplV11.(AppCompatDelegateImplV11.java:31)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatDelegateImplV14.(AppCompatDelegateImplV14.java:55)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)

E/AndroidRuntime( 2632): at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)

E/AndroidRuntime( 2632): at com.freshdesk.hotline.activity.CategoryListActivity.onCreate(Unknown Source)

E/AndroidRuntime( 2632): at android.app.Activity.performCreate(Activity.java:5163)

E/AndroidRuntime( 2632): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)

E/AndroidRuntime( 2632): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)

E/AndroidRuntime( 2632): ... 11 more

E/AndroidRuntime( 2632): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector

E/AndroidRuntime( 2632): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:877)

E/AndroidRuntime( 2632): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)

E/AndroidRuntime( 2632): at android.content.res.Resources.loadDrawable(Resources.java:1948)

E/AndroidRuntime( 2632): ... 30 more`

No Such Element Exception

java.util.NoSuchElementException:
at java.util.LinkedList.removeFirstImpl(LinkedList.java:689)
at java.util.LinkedList.remove(LinkedList.java:899)
at com.freshdesk.hotline.service.HotlineService.onHandleIntent(Unknown Source:0)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)

SDK messing with Android API

Hello,

I have the weirdest issue I have every encountered.
I have nested fragments in my app and without integrating the SDK getChildFragmentManager() works like expected: getChildFragmentManager().findFragmentById(R.id.fragment) returns the fragment , getFragmentManager().findFragmentById(R.id.fragment) returns null.
By just adding the SDK as dependency getChildFragmentManager().findFragmentById(R.id.fragment) returns null but getFragmentManager().findFragmentById(R.id.fragment) returns the fragment.

Also Android studio highlights a warning for an activity extending ActionBarActivity that super.onCreate() has multiple implementations and therefor "Overriding method should call super.onCreate()" on onCreate(Bundle saveInstanceState). Which, again, does not happen when the SDK is not added.

I can't stop wondering if your SDK is not doing something strange. If you need more information please let me know. Would be great if you can shine some light on this, I am scratching my head.

Gradle (simplified):

android {
    compileSdkVersion 21
    buildToolsVersion "23.0.2"
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}
repositories {
    mavenCentral()
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:7.0.0'
    compile 'com.github.freshdesk:hotline-android:1.0.14'
}

java.lang.NullPointerException in faq

Hi, I'm using your library v.1.2.3 and faced with this crash while using faq on Sony Xperia M2 (Android 4.3) java.lang.NullPointerException
at android.webkit.WebViewClassic.sendOurVisibleRect(WebViewClassic.java:3174)
at android.webkit.WebViewClassic.onScrollChanged(WebViewClassic.java:5718)
at android.webkit.WebView.onScrollChanged(WebView.java:2154)
at com.freshdesk.hotline.activity.ao.onScrollChanged(Unknown Source)
at android.view.View.scrollTo(View.java:10391)
at com.freshdesk.hotline.activity.b.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5214)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
at dalvik.system.NativeStart.main(Native Method)

Hotline Service running in the background

I've noticed some service from Hotline running in the background. A few questions:

  1. What is that for? Perhaps for polling of new messages when Push isn't enabled?
  2. Is there any way of disabling it?
  3. It spits out some logging, perhaps that could be configured as well?
    08-15 15:31:22.189 2971-3287/I/HOTLINE_SERVICE: Now Processing h
    08-15 15:31:22.204 2971-3287/I/HOTLINE_SERVICE: Now Processing h
    08-15 15:31:22.213 2971-3287/I/HOTLINE_SERVICE: Now Processing h
    08-15 15:31:22.220 2971-3287/I/HOTLINE_SERVICE: Now Processing h
    08-15 15:31:22.222 2971-3287/I/HOTLINE_SERVICE: Now Processing k
    08-15 15:31:22.224 2971-3287/I/HOTLINE_SERVICE: Now Processing k
    08-15 15:31:22.224 2971-3287/I/HOTLINE_SERVICE: Now Processing k
    08-15 15:31:22.226 2971-3287/I/HOTLINE_SERVICE: Now Processing k

Hotline.jar uses the support v7 22.2.1

Hey @tryprasannan
After forking, I tried making your SDK compatible to latest Android Studio 3.0 with Gradle plugin 3 support, Also with new support library and play services. But since your hotline.jar bundled in the SDK libs uses v7:22.2.1, (this might be to support Android 10+) I guess you need to maintain two branches to supporting latest and 10+ sdks.
Let us know... We are currently converting our app to Android Studio 3 and Gradle Plugin 3 support we are kinda stuck because of this. Please find the enclosed dependency tree

Thanks

screen shot 2017-07-26 at 12 44 07 pm

Resource Leak

A resource was acquired at attached stack trace but never released. 
See java.io.Closeable for information on avoiding resource leaks.

java.lang.Throwable: Explicit termination method 'end' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:180)
at java.util.zip.Inflater.<init>(Inflater.java:104)
at com.android.okhttp.okio.GzipSource.<init>(GzipSource.java:62)
at com.android.okhttp.internal.http.HttpEngine.unzip(HttpEngine.java:645)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:821)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:463)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
at com.demach.konotor.client.helper.a.a(Unknown Source)
at com.demach.konotor.client.helper.a.m(Unknown Source)
at com.freshdesk.hotline.service.helper.a.a(Unknown Source)
at com.freshdesk.hotline.service.handler.d.a(Unknown Source)
at com.freshdesk.hotline.service.handler.d.b(Unknown Source)
at com.freshdesk.hotline.service.executor.b.b(Unknown Source)
at com.freshdesk.hotline.service.HotlineService.onHandleIntent(Unknown Source)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)

Issue while importing SDK as module.

Hi,
When we import SDK as module in app then following error occurs,

Error:Plugin with id 'com.github.dcendents.android-maven' not found.

Though, I found a workaround for this,

We have to add
compile com.github.vajro:MaterialDesignLibrary:1.6 as a dependancy
and have to remove apply plugin: 'com.github.dcendents.android-maven'

and add this in Gradle,

repositories {
        maven { url "https://jitpack.io" }
    }

android 7 会crash

Fatal Exception: android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.daigou.sg/cache/tmp_pics/pic_1490807007065291825884.jpg exposed beyond app through ClipData.Item.getUri()

Notificaition icon issue

I am not able to set the background color behind notification icon on device having android version5.0 and above.

From Android 5.0 and above, we can set background color using method NotificationCompatBuilder.setColor behind notification icon.

Please resolve the issue.

OutOfMemoryError in Hotline's AsyncTask

What the title says. Stacktrace below:

Fatal Exception: java.lang.RuntimeException: An error occured while executing doInBackground()
       at android.os.AsyncTask$3.done(AsyncTask.java:300)
       at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
       at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
       at java.util.concurrent.FutureTask.run(FutureTask.java:242)
       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)
Caused by java.lang.OutOfMemoryError
       at android.graphics.Bitmap.nativeCreate(Bitmap.java)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:922)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:895)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:827)
       at com.freshdesk.hotline.tasks.l.doInBackground(Unknown Source)
       at com.freshdesk.hotline.tasks.l.doInBackground(Unknown Source)
       at android.os.AsyncTask$2.call(AsyncTask.java:288)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)

I tried reproducing it by uploading high resolution images (and taking pictures) in conversation view, but that didn't work.

Its getting crashed due to use of ActionBarActivity in your library when app is uses latest support library(v26.0.0) at the time of writing

Hello It seems app is providing below crash when app is running with latest support library(v26.0.0) with customized them.

Please Note: Its working absolutely fine when it uses last stable version 25.4.0 in my app.

Error for your reference:

FATAL EXCEPTION: main Process: com.cheep, PID: 25356 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/freshdesk/hotline/activity/InterstitialActivity; at com.freshdesk.hotline.util.ar.eY(Unknown Source) at com.freshdesk.hotline.util.ar.eT(Unknown Source) at com.freshdesk.hotline.Hotline.showConversations(Unknown Source) at com.freshdesk.hotline.Hotline.showConversations(Unknown Source) at com.cheep.utils.HotlineHelper.showConversation(HotlineHelper.java:71) at com.cheep.fragment.FAQFragment$2.onClick(FAQFragment.java:137) at android.view.View.performClick(View.java:5637) at android.view.View$PerformClick.run(View.java:22429) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.ClassNotFoundException: com.freshdesk.hotline.activity.InterstitialActivity at java.lang.VMClassLoader.findLoadedClass(Native Method) at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742) at java.lang.ClassLoader.loadClass(ClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.freshdesk.hotline.util.ar.eY(Unknown Source)  at com.freshdesk.hotline.util.ar.eT(Unknown Source)  at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)  at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)  at com.cheep.utils.HotlineHelper.showConversation(HotlineHelper.java:71)  at com.cheep.fragment.FAQFragment$2.onClick(FAQFragment.java:137)  at android.view.View.performClick(View.java:5637)  at android.view.View$PerformClick.run(View.java:22429)  at android.os.Handler.handleCallback(Handler.java:751)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6119)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)  Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/ActionBarActivity; at com.freshdesk.hotline.util.ar.eY(Unknown Source)  at com.freshdesk.hotline.util.ar.eT(Unknown Source)  at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)  at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)  at com.cheep.utils.HotlineHelper.showConversation(HotlineHelper.java:71)  at com.cheep.fragment.FAQFragment$2.onClick(FAQFragment.java:137)  at android.view.View.performClick(View.java:5637)  at android.view.View$PerformClick.run(View.java:22429)  at android.os.Handler.handleCallback(Handler.java:751)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6119)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)  Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.ActionBarActivity" on path: DexPathList[[zip file "/data/app/com.cheep-1/base.apk"],nativeLibraryDirectories=[/data/app/com.cheep-1/lib/x86_64, /data/app/com.cheep-1/base.apk!/lib/x86_64, /system/lib64, /vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.freshdesk.hotline.util.ar.eY(Unknown Source)  at com.freshdesk.hotline.util.ar.eT(Unknown Source)  at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)  at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)  at com.cheep.utils.HotlineHelper.showConversation(HotlineHelper.java:71)  at com.cheep.fragment.FAQFragment$2.onClick(FAQFragment.java:137)  at android.view.View.performClick(View.java:5637)  at android.view.View$PerformClick.run(View.java:22429)  at android.os.Handler.handleCallback(Handler.java:751)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6119)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 

It seems library uses ActioBarActivity class which is been removed now. It should use AppCompatActivity instead.

NoClassDefFoundError in v1.2.6

Please check this. I'm not able to update my app to API 26 because of Hotline.
Hotline 1.2.6
compileSdkVersion 26
buildToolsVersion "26.0.3"
supportLibraryVersion = "26.1.0"

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/freshdesk/hotline/activity/l;
                                                                       at com.freshdesk.hotline.util.t.a(Unknown Source)
                                                                       at com.freshdesk.hotline.Hotline.setNotificationConfig(Unknown Source)

Missing/Bad FileProvider in v1.2.1

In hotline android sdk v1.2.1, I get an error toast message saying "missing/bad FileProvider for hotline. Camera capture will fail in devices running Nougat or later (error code 354)." Could you please explain what issue this is and the fix for this? Thank you.

Camera orientation issue

When a user sends a landscape image, it is shown with the wrong orientation on the chat.
We tried it with a Samsung S4.

E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/freshdesk/hotline/activity/InterstitialActivity;

E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/freshdesk/hotline/activity/InterstitialActivity;
at com.freshdesk.hotline.util.ar.eY(Unknown Source)
at com.freshdesk.hotline.util.ar.eT(Unknown Source)
at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)
at com.freshdesk.hotline.Hotline.showConversations(Unknown Source)
at co.edgeapp.android.db.SupportService.showConversations(SupportService.java:61)
at co.edgeapp.android.bounty.DefaultBountyActionListener.onReplyToRejection(DefaultBountyActionListener.java:144)
at co.edgeapp.android.bounty.BountyHolder.lambda$getRejectionSnippet$15(BountyHolder.java:1176)
at co.edgeapp.android.bounty.BountyHolder$$Lambda$18.onClick(Unknown Source)
at android.view.View.performClick(View.java:5201)
at android.view.View$PerformClick.run(View.java:21163)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.freshdesk.hotline.activity.InterstitialActivity" on path: DexPathList[[zip file "/data/app/co.edgeapp.android-2/base.apk"],nativeLibraryDirectories=[/data/app/co.edgeapp.android-2/lib/arm, /data/app/co.edgeapp.android-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.freshdesk.hotline.util.ar.eY(Unknown Source) 
at com.freshdesk.hotline.util.ar.eT(Unknown Source) 
at com.freshdesk.hotline.Hotline.showConversations(Unknown Source) 
at com.freshdesk.hotline.Hotline.showConversations(Unknown Source) 
at co.edgeapp.android.db.SupportService.showConversations(SupportService.java:61) 
at co.edgeapp.android.bounty.DefaultBountyActionListener.onReplyToRejection(DefaultBountyActionListener.java:144) 
at co.edgeapp.android.bounty.BountyHolder.lambda$getRejectionSnippet$15(BountyHolder.java:1176) 
at co.edgeapp.android.bounty.BountyHolder$$Lambda$18.onClick(Unknown Source) 
at android.view.View.performClick(View.java:5201) 
at android.view.View$PerformClick.run(View.java:21163) 
at android.os.Handler.handleCallback(Handler.java:746) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5443) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 
Suppressed: java.lang.NoClassDefFoundError: com.freshdesk.hotline.activity.InterstitialActivity
at dalvik.system.DexFile.defineClassNative(Native Method)
at dalvik.system.DexFile.defineClass(DexFile.java:226)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
at dalvik.system.DexPathList.findClass(DexPathList.java:338)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
... 19 more
Suppressed: java.lang.ClassNotFoundException: com.freshdesk.hotline.activity.InterstitialActivity
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 18 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Hotline integration on Kindle Fire

We see the following warning on Kindle Fire
W/HOTLINE ( 7849): Cannot proceed because the user was not created. Backlog created for message

The same build works properly on android devices. What is this error? Please let us know what should we do to fix it.

DatabaseObjectNotClosedException

Finalizing a Cursor that has not been deactivated or closed - Hotline DB, but i have cleared the user data using the following code- Hotline.clearUserData(getApplicationContext()) as explained in the document. Can anyone tell me how to close the db and where to close the db.

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.