AppCompatActivity cannot be converted to Application

hi guys, i need to implement a sdk using uno method. but i’m falling to build it due to this error: AppCompatActivity cannot be converted to Application

this is what looks like the pure java code.

public class DemoApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        TripAnalysis.init(this);
        try {
            TripAnalysis.setUserId("MyUser");
            TripAnalysis.activateAutoStart(true, createForegroundNotification());
        } catch (SDKNotInitializedException e) {
            e.printStackTrace();
        }
    }
}

and this is how i’m trying to implement it from uno.

    [Foreign(Language.Java)]
      static extern(Android) void Init()
      @{
        TripAnalysis.init(Activity.getRootActivity());
        try {
            TripAnalysis.setUserId("MyUser");
            // TripAnalysis.activateAutoStart(true, createForegroundNotification());
        } catch (SDKNotInitializedException e) {
            e.printStackTrace();
        }
      @}

anyone to help ?

Fuse doesn’t let you replace the application class. I’m confused as why you need to though it looks like you are just trying to run some code on App startup and we have nicer ways to do this.

Could you explain your app/library’s goal a little and we’ll give you a more Fuse’y (and cross platform) solution!

The sdk i’m using here its an in-house one who use geolocation and accelerometer to do eco driving analysis, car energy consumption analysis and other stuff like this.