Skip to content

Android activities and GetBaseActivityEvents #7990

@queequac

Description

@queequac

First of all, working with custom Android activities is not really documented. I am not sure if I have really a clue how this should be used within a Uno app.
Anyway, it says I could access to the main activity events by adding the following line, ideally in the App constructor:

ApplicationViewHelper.GetBaseActivityEvents().Create += OnCreateEvent;

On which page?

https://platform.uno/docs/articles/android-activities.html

What's wrong?

But adding this line to the constructor and registering OnCreateEvent is enough so the app won't start anymore, throwing
System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.' instead.

Any feedback?

Some guidance on Android activities would be nice, and maybe a hint how/where to register properly for the above event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.triage/untriagedIndicates an issue requires triaging or verification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions