LogmeinRescue / Android-SDK

Rescue In-App Support Android SDK
http://secure.logmeinrescue.com/welcome/webhelp/EN/SDKa/MobileSDK/c_rasdk_overview.html
Other
5 stars 6 forks source link

Application Lifecyccle callback Issue #21

Closed sarath-natesan-dev closed 6 years ago

sarath-natesan-dev commented 6 years ago

App lifecycle callback is handled properly fpr App Screen Streaming, only if RescueSDK.initializeLifecycleReporter(application) is called in Application class, but not in any other Android component with a valid instance of the Application class as follows:

RescueSDK.initializeLifecycleReporter((Application)getApplicationContext())

Steps to Reproduce

Expected Outcomes Technician should be able to view the app screen in LogMeIn-Console

Actual Outcome Technician is not able to view the app screen in LogMeIn-Console

Other information The whole session video is avalble here

balazsbanyai commented 6 years ago

Hello,

The behavior that you described is expected.

As the documentation says: You must use the following snippet in your application's onCreate method:

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        RescueSDK.initializeLifecycleReporter(this);
    }
}

The reason for this lies in the machinery of the Android applications themselves: If you don't listen to the lifecycle callbacks from the very first moment that the application is started, then the lifecycle tracker will not be able to track the started and finished activities properly.

Please call the described method in your application's onCreate method.