question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: Add onConfigurationChanged() handling to the Android capacitor plugin infrastructure

See original GitHub issue

Feature Request

Add onConfigurationChanged() handling to the Android capacitor plugin infrastructure

Description

Sometimes it is appropriate to handle the Android’s “onConfigurationChanged()” events in plugins. As of now the infrastructure does not support the feature, so a plugin cannot react to the configuration change events on Android platform.

Platform(s)

Android

Preferred Solution

Add the following handler to Plugin.java and support it in the Capacitor (like handleOnStart()):

/**
   * Handle handleOnConfigurationChanged
   */
  protected void handleOnConfigurationChanged() {}

Alternatives

None

Additional Context

None

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
shpassercommented, Dec 11, 2020

The actual reason I opened this feature request is that I need it for my ionic plugin. The second thought was that there is no reason why the other hooks are implemented and this one is not.

1reaction
imhoffdcommented, Dec 11, 2020

@wf9a5m75 I have a PR up for this and it should make it into 3.0.0-alpha.8.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing for Android - Capacitor
Open MainActivity.java and add an onCreate() method where we can register the plugin: package io.ionic.cap.plugin; import android.os.Bundle;
Read more >
Handling Screen Orientation Changes in Capacitor Apps
This tutorial discusses how to handle screen orientation changes on capacitor based Android and iOS apps. Fundamentals of an Ionic App.
Read more >
Ionic6 Capacitor: After adding "cordova-plugin-advanced-http ...
Go to this location on your file explorer <android\capacitor-cordova-android-plugins\ ... PathHandler getPathHandler() { return handler; } }.
Read more >
Take Control of Your Capacitor App State - Ionic Blog
In this tutorial we will explore all features of the plugin to control our state, catch events like the Android back button or...
Read more >
capacitor-plugin-playlist - npm
Will probably be published as @dwbn/capacitor-playlist. A capacitor plugin for Android, iOS and Web with native support for audio playlists, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found