Comments (4)
@KeizerDev
Sorry for the late reply.
This error occurs if CustomTabsPackage
is not provided. I updated the installation of README.md.
from react-native-custom-tabs.
@droibit
I imported CustomTabsPackage
but still have the same error
My MainApplication.java
:
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import com.github.droibit.android.reactnative.customtabs.CustomTabsPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNDeviceInfo(),
new VectorIconsPackage(),
new CustomTabsPackage()
);
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
from react-native-custom-tabs.
I guess @ethanyuwang 's issue is in the Javascript code.
You need to import the CustomTabs
object from the react-native-custom-tabs
library at the top of your file then use it withCustomTabs.openURL(...)
:
import { CustomTabs } from 'react-native-custom-tabs';
...
CustomTabs.openURL('someURL')
.catch((e) => handleError(e));
from react-native-custom-tabs.
Hi i'm having this issue as well! i am using expo also or is this not compatible?
from react-native-custom-tabs.
Related Issues (20)
- Pre-starting / Pre - feching in react native chrome custom tab
- Not working in React Native 0.56 HOT 1
- Bump version and publish on npm
- React Native 0.56+ android build failure
- package com.github.droibit.android.reactnative.customtabs does not exist HOT 2
- Is there a way to know that user got back to the app? HOT 1
- Is there a way to add a custom menu item?
- Adding support for SafariView for iOS HOT 1
- Is there any way to create a callback function on attempt to close the custom tab?
- Typescript support
- Podspec needed for RN0.60 HOT 2
- Path or configuration is wrong when compiling project to ios HOT 2
- React custom tabs component crashing Xcode
- Navigation is blocked
- Cannot find symbol CustomTabsIntent HOT 1
- Still maintained? HOT 3
- Build failing on `import android.support.customtabs.CustomTabsIntent`
- openURL fails on ios HOT 3
- Support new React Native new architecture
- upgrade reac-native to 0.71.6,an error occurred HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-custom-tabs.