import { EampluginCommon } from './common';
import { Application as app, } from "@nativescript/core";

export class Eamplugin extends EampluginCommon {

    public launchEAM() {
        var intent = new android.content.Intent(app.android.foregroundActivity, 
            com.infor.android.eam.tablet.activity.SplashActivity.class   );
        
        intent.setFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK); 
        app.android.foregroundActivity.startActivity(intent);
    }

    public stopEAM() { 
        app.android.foregroundActivity.finish();
    }

}


export class EAMDUXApplication extends com.infor.android.eam.tablet.EAMAndroidApplication {
    public onCreate(): void {
        super.onCreate();

        // At this point modules have already been initialized
        // Enter custom initialization code here
    }

    public attachBaseContext(baseContext: android.content.Context) {
        super.attachBaseContext(baseContext);

        // This code enables MultiDex support for the application (if needed)
        // androidx.multidex.MultiDex.install(this);
    }
}

export class EAMDuxApplicationDelegate {}