Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] allow to emit events on android MainActivity #12153

Open
zhangsan946 opened this issue Jan 3, 2025 · 0 comments
Open

[feat] allow to emit events on android MainActivity #12153

zhangsan946 opened this issue Jan 3, 2025 · 0 comments

Comments

@zhangsan946
Copy link

zhangsan946 commented Jan 3, 2025

Describe the problem

I wanna to make my app reponsible to the config change.

Describe the solution you'd like

As per https://tauri.app/develop/plugins/develop-mobile/#plugin-events, the trigger function only works in plugins. But the config change handler should be defined in MainActivity.

<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode">
</activity>

class MainActivity : TauriActivity() {
    override fun onConfigurationChanged(newConfig: Configuration) {
        ...
    }
}

Can we support trigger function in MainActivity as well?

Alternatives considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant