lucasferreira / react-native-send-intent

React Native Android module to use Android's Intent actions for send text to shareable apps or make phone calls or opening third party apps
419 stars 159 forks source link

RNSendIntentAndroid.sendTextWithTitle is not a function #144

Closed thezoneapp closed 2 years ago

thezoneapp commented 2 years ago

please... help me!!! why????

TypeError: RNSendIntentAndroid.sendTextWithTitle is not a function. (In 'RNSendIntentAndroid.sendTextWithTitle(config.title, config.text, config.type || "text/plain")', 'RNSendIntentAndroid.sendTextWithTitle' is undefined) at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError at node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0

------ MainApplication.java package com.spiderapp;

import android.app.Application; import android.content.Context; import android.content.res.Configuration; import androidx.annotation.NonNull;

import com.facebook.react.PackageList; import com.facebook.react.ReactApplication; import com.burnweb.rnsendintent.RNSendIntentPackage; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader;

import expo.modules.ApplicationLifecycleDispatcher; import expo.modules.ReactNativeHostWrapper;

import com.facebook.react.bridge.JSIModulePackage; import com.swmansion.reanimated.ReanimatedJSIModulePackage;

import java.lang.reflect.InvocationTargetException; import java.util.List;

public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper( this, new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; }

@Override
protected List<ReactPackage> getPackages() {
  List<ReactPackage> packages = new PackageList(this).getPackages();
  // Packages that cannot be autolinked yet can be added manually here, for example:
  // packages.add(new MyReactNativePackage());
  packages.add(MainReactPackage());
  packages.add(RNSendIntentPackage());

  return packages;
}

@Override
protected String getJSMainModuleName() {
  return "index";
}

@Override
protected JSIModulePackage getJSIModulePackage() {
  return new ReanimatedJSIModulePackage();
}

});

@Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; }

@Override public void onCreate() { super.onCreate(); SoLoader.init(this, / native exopackage / false);

initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
ApplicationLifecycleDispatcher.onApplicationCreate(this);

}

@Override public void onConfigurationChanged(@NonNull Configuration newConfig) { super.onConfigurationChanged(newConfig); ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig); }

/**