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

Embedded Capacitor: Remove unused interaction listener #3552

Merged
merged 2 commits into from
Sep 24, 2020

Conversation

fkirc
Copy link
Contributor

@fkirc fkirc commented Sep 14, 2020

When integrating embedded Capacitor, one of the first errors is RuntimeException: activity must implement OnFragmentInteractionListener.
To fix this exception, one needs to implement BridgeFragment.onFragmentInteractionListener like so:

import android.net.Uri;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.getcapacitor.BridgeFragment;

public class MainActivity extends AppCompatActivity implements BridgeFragment.OnFragmentInteractionListener {
  @Override
  public void onFragmentInteraction(Uri uri) {
    // This is never ever called!
  }
}

However, this listener gets not called anywhere. Therefore, this listener needlessly confuses the integration process for embedded Capacitor.
If someone wants to use a working listener like this, then it is possible to subclass BridgeFragment.

@fkirc fkirc changed the title Embedded Android: Remove unused interaction listener Embedded Capacitor: Remove unused interaction listener Sep 14, 2020
@carlpoole carlpoole changed the base branch from main to 2.x September 23, 2020 23:45
@carlpoole carlpoole changed the base branch from 2.x to main September 23, 2020 23:46
@carlpoole carlpoole merged commit 69fc490 into ionic-team:main Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants