Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all 28479 articles
Browse latest View live

stuck at starting intent main activity react native app

$
0
0

Trying to run the react native app on mobile device connected using react-native run-android. The app build was successful but the app crash on opening and on the command prompt it stucks on Starting: Intent { cpm=com.project.projectname/.MainActivity }

The App installed on the mobile device but always keep stopping. Can someone help me how to debug this and i cant see where the error messages at.

this the whole command prompt output

C:\xampp\htdocs\projectname>react-native run-androidinfo Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.Jetifier found 1109 file(s) to forward-jetify. Using 4 workers...info Starting JS server...'C:\Users\user' is not recognized as an internal or external command,operable program or batch file.info Launching emulator...error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.info Installing the app...Parallel execution with configuration on demand is an incubating feature.> Configure project :appWARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.htmlCould not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)> Configure project :react-native-firebasereact-native-firebase: using React Native prebuilt binary from C:\xampp\htdocs\projectname\node_modules\react-native\android> Task :app:processDebugGoogleServicesParsing json file: C:\xampp\htdocs\projectname\android\app\google-services.json> Task :app:processDebugManifestC:\xampp\htdocs\projectname\android\app\src\main\AndroidManifest.xml:24:9-31:50 Warning:        activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present> Task :react-native-camera:compileGeneralDebugJavaWithJavac> Task :react-native-firebase:compileDebugJavaWithJavac> Task :app:transformClassesWithFirebasePerformancePluginForDebugjava.lang.ClassNotFoundException: android.graphics.fonts.Fontjava.lang.ClassNotFoundException: android.graphics.fonts.Fontjava.lang.ClassNotFoundException: android.graphics.fonts.Fontjava.lang.ClassNotFoundException: android.graphics.fonts.Fontjava.lang.ClassNotFoundException: com.google.firebase.dynamiclinks.DynamicLink$Builder> Task :app:installDebug09:26:46 V/ddms: execute: running am get-config09:26:46 V/ddms: execute 'am get-config' on 'R58M55ASZDM' : EOF hit. Read: -109:26:46 V/ddms: execute: returningInstalling APK 'app-debug.apk' on 'SM-A105G - 9' for app:debug09:26:46 D/app-debug.apk: Uploading app-debug.apk onto device 'R58M55ASZDM'09:26:46 D/Device: Uploading file onto device 'R58M55ASZDM'09:26:47 D/ddms: Reading file permision of C:\xampp\htdocs\projectname\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------09:26:47 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"09:27:16 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'R58M55ASZDM' : EOF hit. Read: -109:27:16 V/ddms: execute: returning09:27:16 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"09:27:16 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'R58M55ASZDM' : EOF hit. Read: -109:27:16 V/ddms: execute: returningInstalled on 1 device.Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.Use '--warning-mode all' to show the individual deprecation warnings.See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warningsBUILD SUCCESSFUL in 20m 38s62 actionable tasks: 59 executed, 3 up-to-dateinfo Connecting to the development server...info Starting the app...Starting: Intent { cmp=com.project.projectname/.MainActivity }

Could not find or load main class org.gradle.wrapper.GradleWrapperMain in react native

$
0
0

I am trying to set up an existing react native project. I have got a zip file with project and want to make it run with android emulator from android studio.

For this I run npm install, then npx react-native run-android (while running the android emulator). After that I keep getting an error

Could not find or load main class org.gradle.wrapper.GradleWrapperMain

. I have already tried all possible solutions I could find here and everywhere like running gradle wrapper etc.

After deleting the gradle folder and setting it up again (with gradle wrapper) I've got different error message

React native: Android project not found. Maybe run react-native android first?

So I run react-native upgrade clicked -y to all options ( like shown here. After that I got the same error again

Could not find or load main class org.gradle.wrapper.GradleWrapperMain

RequireNativeComponent: "ToolbarAndroid" was not found in the UIManager. O que é e como resolver isso?

$
0
0

I followed the steps of the installation tutorial toolbarAndoid and the implementation tutorial expo, but when running on the android application the following stack appears:

InvariantViolation: requireNativeComponent: "ToolbarAndroid" was not found in the UIManager.This error is located at:   in ToolbarAndroid (at ToobarAndroid.android.js:228)   in ToolbarAndroid (at ToobarAndroid.android.js:242)   in FowardRef (at Main.js:9)   in Main (created by SceneView)   in SceneView (created by Drawer)   in RCTView (created by ResourceSavingScene)   ...

I'm using:

  • Expo 37.0.3 (SDK37)
  • React Native: 0.61.4
  • React Navigation: 4.3.9
  • App Expo Client version: 2.15.4

How to get current route name in react-navigation?

$
0
0

I want the name of the current route or screen in react-navigation which I want to use inside if condition to make some changes.

ACRA Mailer not giving me share file as window in Android 10

$
0
0

I am using ACRA 5.5.1 in React Native 0.61.2. I am using Dailog + Mailer feature to send the crash reports.

@AcraCore(buildConfigClass = BuildConfig.class,    reportFormat = StringFormat.JSON)@AcraMailSender(mailTo = "email",   resSubject = R.string.acra_mail_subject,   reportFileName = "ErrorReport",   reportAsFile = true)@AcraToast(resText = R.string.acra_toast_text)public class MainApplication extends Application implements ReactApplication {@Overrideprotected void attachBaseContext(Context base) {    super.attachBaseContext(base);    CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this)            .setBuildConfigClass(BuildConfig.class)            .setReportFormat(StringFormat.JSON);    builder.getPluginConfigurationBuilder(ToastConfigurationBuilder.class)            .setResText(R.string.acra_toast_text);   builder.getPluginConfigurationBuilder(MailSenderConfigurationBuilder.class)           .setMailTo("email")           .setResSubject(R.string.acra_mail_subject)           .setReportFileName("ErrorReport")           .setReportAsFile(true);    ACRA.init(this, builder);}}

Now, when I am using the APK in android 5.0, everytime my app crashes it open up a small window at bottom to share the report via email. The image bellow shows the share option popping up in Android 5.0, Phone is Sony Xperia E2362.

enter image description here

But when I am using the APK in Android 10, phone xiaomi poco f1. It doesn't show me any window to share the file.But right after I install my app, xiaomi scans the app and gives one option to open it. And when I open the app from that window I get that share report via email popup, after the app crashes.But not when I normally open my app from app menu.Bellow image shows the app scanning window which shows an option to open app and the second image which shows the share report via email when I use scanning window to open app.

enter image description hereenter image description here

I don't know what am I missing. Please help.

how to set react native button to full width

$
0
0

I have tried all of the examples out there but I can not figure it out. I am using this https://github.com/xinthink/react-native-material-kit

If I use the dimensions as the width the button width goes off screen. I would like if possible to have the logo at the very top and the form and button at the very button. this is for android only.

 const btnStyle = {btn: {    flex: 1,    flexDirection: "row"    //resizeMode: 'cover'}};const ColoredRaisedButton = MKButton.coloredButton().withStyle(btnStyle.btn).build();<ScrollView style={styles.scrollView}><View style={styles.container}>    {/* Here the magic happens*/}<View style={styles.cardStyle}><Image            source={require("./../img/logo_login.jpg")}            style={styles.cardImageStyle}        /><View style={styles.cardContentStyle}><Form                ref="form"                type={User}                onChange={this.onChange.bind(this)}                value={this.state.value}                options={options}            /></View><View style={styles.cardActionStyle}><ColoredRaisedButton><Text pointerEvents="none" style={styles.buttonText}>                    BUTTON</Text></ColoredRaisedButton></View></View></View></ScrollView>;const styles = {cardStyle: {    flex: 1,    backgroundColor: "#ffffff",    borderRadius: 2,    borderColor: "#ffffff",    borderWidth: 1,    shadowColor: "rgba(0,0,0,.12)",    shadowOpacity: 0.8,    shadowRadius: 2,    alignItems: "center",    flexDirection: "column",    justifyContent: "center",    shadowOffset: {        height: 1,        width: 2    }},cardImageStyle: {    flex: 1,    height: 170,    flexDirection: "row",    resizeMode: "cover"},cardContentStyle: {    padding: 15 //,    // bottom:0,    // position:'absolute',    //justifyContent: 'flex-end'},cardActionStyle: {    flex: 1,    borderStyle: "solid",    borderTopColor: "rgba(0,0,0,.1)",    borderTopWidth: 1,    padding: 15,    alignItems: "center",    flexDirection: "column",    justifyContent: "center"},scrollView: {    flex: 1},container: {    flex: 1,    alignItems: "stretch",    backgroundColor: "#eae9e9",    padding: 20 //,    //position:'absolute'},buttonText: {    fontSize: 14,    fontWeight: "bold",    color: "white"}};

Blue status bar not changing in drawer navigation routes Native Base React Native

$
0
0

I am using stack navigation and drawer navigation for some screens. I have created customized status bar with background color white and dark content. However it is working with the stack navigation routes but not with drawer navigation routes. Blue status bar is showing in drawer navigation routes as below:

enter image description here

My Routes.js (Where I used stack navigation)

....import { createStackNavigator, HeaderBackButton } from 'react-navigation-stack';import { Drawer } from '../components/Drawer';const RootStack = createStackNavigator(    {        Drawer: {             screen: Drawer        },         // other screens     },    {        initialRouteName: 'InitialScreen',        headerMode: "none",    })const App = createAppContainer(RootStack);export default App;

My Drawer.js (Where is use Drawer Navigation and blue bar is not changing)

.....import { createDrawerNavigator } from 'react-navigation-drawer';import ProductScreen from '../screens/ProductScreen';export const Drawer = createDrawerNavigator(    {        Product: { screen: ProductScreen }    },    {        navigationOptions: () => ({            drawerLockMode: 'locked-closed',        }),        initialRouteName: "Product",        drawerPosition: 'left',        headerMode: 'none'    });

How to change this blue bar on drawer navigation ?

React Native application context

$
0
0

I a, developing an application using react Native version 0.59.10 an react-native-navigation version 1.1.493. I used MobX for state management.

Currently i am trying to integrate a native SDK that tracks the user driving sessions.

Before the SDK can be initialized the asks the user for location permissions.

Once the SDK is initialized it broadcast an event to the JS layer using the following code:

fun notifyJS(  context: Context?,  receiver: BroadcastReceiver,  eventName: String,  data: WritableMap?) {  val reactApplication = context?.applicationContext as? ReactApplication  val instanceManager = reactApplication?.reactNativeHost?.reactInstanceManager  val reactContext = instanceManager?.currentReactContext  if (reactContext != null) {    Log.d(      LOG_TAG,"React context is available, sending event $eventName"    )    reactApplication.reactNativeHost?.reactInstanceManager?.currentReactContext?.getJSModule(      DeviceEventManagerModule.RCTDeviceEventEmitter::class.java    )?.emit(eventName, data)  } else {    Log.d(LOG_TAG, "React context is not available")    val pendingResult = receiver.goAsync()    instanceManager!!.addReactInstanceEventListener(      object : ReactInstanceManager.ReactInstanceEventListener {        override fun onReactContextInitialized(reactContext: ReactContext) {          Log.v(            LOG_TAG,"React context is initialized sending js event $eventName"          )          reactContext.getJSModule(            DeviceEventManagerModule.RCTDeviceEventEmitter::class.java          )?.emit(eventName, data)          instanceManager.removeReactInstanceEventListener(this)          pendingResult.finish()        }      })    instanceManager.createReactContextInBackground()    Log.d(LOG_TAG, "Called to create context in the background")  }}

at this point the reactContext variable is always null, even if the application is in the foreground which causes the application to restarts itself.

I have basic understanding in native development, and i search the web for hours about the case but i cant seem to understand how the context can be null when the application is in the foreground.

So i am guessing there is the possibility that maybe this code gets the wrong context...?

My application uses some other 3rd party libraries and this is the current package.json file

"dependencies": {"@appdynamics/react-native-agent": "^1.0.223","@types/react": "^16.9.1","@types/react-native": "^0.57.65","babel-plugin-macros": "^2.6.1","bugsnag-react-native": "^2.19.1","cross-env": "^6.0.3","fsevents": "^2.1.3","intent-router": "0.0.13","mobx": "3.3.1","mobx-react": "4.3.3","moment": "^2.24.0","moment-timezone": "^0.5.26","react": "16.8.3","react-native": "0.59.10","react-native-audio": "^4.1.3","react-native-base64": "^0.0.2","react-native-cardview": "^1.1.5","react-native-chart-kit": "^5.5.0","react-native-circular-progress": "^1.3.6","react-native-communications": "^2.2.1","react-native-config": "^0.11.7","react-native-device-info": "^2.3.2","react-native-doc-viewer": "^2.7.8","react-native-document-picker": "^3.2.4","react-native-fetch-blob": "^0.10.8","react-native-firebase": "^5.5.6","react-native-image-picker": "^0.26.7","react-native-maps": "0.25.0","react-native-mime-types": "^2.2.1","react-native-navigation": "1.1.493","react-native-open-settings": "^1.0.1","react-native-pages": "^0.9.0","react-native-render-html": "^4.1.2","react-native-restart": "^0.0.12","react-native-settings": "^0.1.1","react-native-signature-capture": "^0.4.9","react-native-snackbar": "^2.2.0","react-native-sound": "^0.10.9","react-native-splash-screen": "^3.2.0","react-native-svg": "^12.1.0","react-native-swipe-list-view": "^3.0.1","react-native-swipeable": "^0.6.0","react-native-swiper": "^1.5.14","react-native-timer": "^1.3.6","react-native-zendrive": "latest","typescript": "^3.5.3","victory-native": "^34.1.0"  }

On my testing to figure out what causing this behavior i started removing libraries from my code, even when i only loaded the: ReactNativePackage, ReactNativeConfigPackage and the RNNPackage to issues occurs so i am pretty sre the problem comes from the use of react-native-navigation.

So i tried to create a new black application to reproduce this issue but on a brand new application (same react-native and rnn version) the issue does not reproduce. So i am guessing that over time while developing the application some configurations and patches were placed somewhere in the code.

I am having really hard time to debug and targeting what causing this issue


React Native - How to get My project class in module?

$
0
0

I want to use ComponentName in my react native module.

PackageManager pm = reactContext.getPackageManager();ComponentName cn = new ComponentName(reactContext,com.my.app.MyClass.class);pm.setComponentEnabledSetting(cn,PackageManager.COMPONENT_ENABLED_STATE_ENABLED,PackageManager.DONT_KILL_APP);

I want to use code like this.HoweverCan't get com.my.app.MyClass.class What should I do?

Is there a method that like getResources() for class?

React Native Android: Detect tap on a notification

$
0
0

I'm trying to detect a click on a notification.

I use react-native 0.61 and : react-native-notifications 3.1.4 (but get the same results with react-native-push-notification 3.1.9).

Everything works well but one thing: if I tap a notification or if I open my app from a notification with a notification from Firebase admin (or curl to FCM) I don't get those events fired:

Notifications.events().registerNotificationOpened

and

Notifications.getInitialNotification()

Howewer if I post a simple local notification with Notifications.postLocalNotification, everything works well.

Here is my standard curl request:

curl -X POST \  https://fcm.googleapis.com/fcm/send \  -H 'Authorization: key=mykey' \  -H 'Content-Type: application/json' \  -H 'Host: fcm.googleapis.com' \  -d '{"to" : "cgh6P5BESPesyBJwYlaSPi:APA91bEuLwxgZq4JUlo2Su-_l1DqNVoAPzC2eHQy07IQlTuUcZNRuFiLzlbiFuCsHhU74SgYbrIkY7e2v4uQbYCspzRLlDrwrfha40Ozv613xwyYPtR3lJMaTuNcNAhGh8bdrmMY4B3N","payload" : {"body" : "Body of Your Notification in Data","title": "Title of Your Notification in Title", "pushNotification": true,    }

Again, the notification appears but if I click on it, I don't get any event fired. However if I use postLocalNotification I get those events.

I have been struggling with this for days now, do I have to do something with intents in my AndroidManifest? Is there an example project with this working?

react-native deeplinking not working in in-app browser

$
0
0

I'm working on a mobile application where at some point on registration we send user a link in email for verification. When user opens the link in the email, it verifies the user. Now the issue is it works great on web but on mobile we expect the app to be open because we have defined the intent-filter(I've attached my intent code below) but it doesn't. Basically gmail opens the link in in-App browser and if I open link explicitly on a browser the intent works fine and it opens the app but in in-App it doesn't work.

AndroidManifest.xml

<!-- for deep linking --><intent-filter android:autoVerify="true"> <action android:name="android.intent.action.MAIN"/><action android:name="android.intent.action.VIEW"/><category android:name="android.intent.category.DEFAULT"/><category android:name="android.intent.category.BROWSABLE"/><category android:name="android.intent.category.LAUNCHER"/><data android:scheme="https" android:host="*.example.net" android:path="*" /><data android:scheme="https" android:host="example.net" android:path="*" /></intent-filter>

package.json

{  ..."react-native": "0.59.10", "react-navigation": "3.9.1",  ...}

Getting "D8: " texts in the logs of release build of react native app

React Native Warning: "Setting a timer for a long period of time...". How to locate cause?

$
0
0

Everything on iOS works fine. On Android I am getting the warning "Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info. (Saw setTimeout with duration 589668ms)"

I don't use any timers in my app so I am assuming this is from an NPM module I have installed. How can I determine which one is causing this?

I see that I can ignore the waring, but I would like to report the issue to the module maintainer.

Decompile React Native index.android.bundle

$
0
0

I am using React Native and integrated library react-native-obfuscating-transformerto obfuscate my code. Now after decompiling my APK, I believe my whole js code is under assets/index.android.bundle.

How can I debundle it and see my code whether obfuscation worked or not.

How to do hardening of iOS and Android apps

$
0
0

We are looking for options to harden our app and need the following

  • Obfuscation
  • Jailbreak/Root detection
  • Hook detection
  • Swizzle detection (iOS)

What I found were:

Android - Obfuscation by proguard - Root detection using RootBeer https://github.com/scottyab/rootbeer - Hook detection ?

iOS - Obfuscation by xcode during builds - Jailbreak detection using https://github.com/TheSwiftyCoder/JailBreak-Detection - Hook detection ? - Swizzle detection?

How is hook detection done for iOS and Android.

Also for cordova/flutter apps are there any libraries for Hook detection and general app hardening in general?


Problem with opening screen with onPress in React Native

$
0
0

I dont have any errors but I still cant open screen that I want. Here is my FlatList item:

let categories = [         {            screenName : Player,            name : "Category 1",            img : require("../Assets/Slika.jpg"),        },

Here is TouchableOpacity with onPress

return (<View style={styles.container}><FlatList                    data={categories}                    showsHorizontalScrollIndicator={false}                    numColumns={categories.length / 5}                    showsVerticalScrollIndicator={false}                    keyExtractor={(item, index) => index.toString()}                    renderItem = {({item, index}) => {                        return (<TouchableOpacity onPress={() => item.screenName}><Surface style={styles.surface}><ImageBackground                            source={item.img}                             style={styles.img}                            blurRadius={0.5}><Icon name="music" color="#fff" size={22}/><Text style={styles.name}>{item.name}</Text></ImageBackground></Surface></TouchableOpacity>                        );                    }}                /></View>

type is invalid -- expected a string, react-native error

$
0
0

I'm new at React-Native. I'm trying to build an app on mobile. But when I run this code I'm getting this error: React.createElement: type is invalid -- expected a string (for built-in components). My App.js:

import React from 'react';import { StyleSheet, View } from 'react-native';import { Header } from './components/Header';export default function App() {  return (<View style={styles.screen}><Header title="guess a number"/></View>  );}const styles = StyleSheet.create({  screen:{    flex: 1  }});

My Header.js:

import React from 'react';import { View, Text, StyleSheet } from 'react-native';const Header = props => {    return(<View style={styles.header}><Text style={styles.headerTitle}> {props.title}</Text></View>    );};const styles=StyleSheet.create({    header: {        width:'100%',        height:90,        paddingTop: 36,        backgroundColor:'#f7287b',        alignItems: 'center',        justifyContent: 'center'    },    headerTitle: {        color:'black',        fontSize: 18    }});export default Header;

What should i do?

error

React Native: ViewManager for tag could not be found

$
0
0

We are getting several of the following errors when running logcat in my RN Android app. It doesn't crash the app but if possible I'd like some guidance on how to debug them to understand what's going on.

Unable to update properties for view tag 323com.facebook.react.uimanager.IllegalViewOperationException: ViewManager for tag 323 could not be found. View already dropped? false.Last index 0 in last 100 views[I@1eeace9   at com.facebook.react.uimanager.NativeViewHierarchyManager.resolveViewManager(NativeViewHierarchyManager.java:112)   at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:135)   at com.facebook.react.uimanager.UIImplementation.synchronouslyUpdateViewOnUIThread(UIImplementation.java:309)   at com.facebook.react.uimanager.UIManagerModule.synchronouslyUpdateViewOnUIThread(UIManagerModule.java:396)   at com.facebook.react.animated.PropsAnimatedNode.updateView(PropsAnimatedNode.java:94)   at com.facebook.react.animated.NativeAnimatedNodesManager.updateNodes(NativeAnimatedNodesManager.java:544)   at com.facebook.react.animated.NativeAnimatedNodesManager.runUpdates(NativeAnimatedNodesManager.java:453)   at com.facebook.react.animated.NativeAnimatedModule$1.doFrameGuarded(NativeAnimatedModule.java:100)   at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)   at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172)   at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:965)   at android.view.Choreographer.doCallbacks(Choreographer.java:791)   at android.view.Choreographer.doFrame(Choreographer.java:722)   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)   at android.os.Handler.handleCallback(Handler.java:883)   at android.os.Handler.dispatchMessage(Handler.java:100)   at android.os.Looper.loop(Looper.java:214)   at android.app.ActivityThread.main(ActivityThread.java:7356)   at java.lang.reflect.Method.invoke(Native Method)   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Thanks!

react native release apk crashes on RazorpayCheckout.open razorpay gateway

$
0
0

I am new to react-native and payment gateway and creating an android app,I am using "react": "16.9.0","react-native": "0.60.5","react-native-razorpay": "^2.1.30",

also i linked the using react-native link react-native-razorpay

and imported package as

import RazorpayCheckout from 'react-native-razorpay';

and calling gateway as :

    RazorpayCheckout.open(options).then((data) => {       .............        alert(`Success: ${JSON.stringify(data)}`);    }).catch((error) => {        alert(`Error: ${JSON.stringify(error)}`);    });

the code works when i am running the app in debug mode, but when i create apk using bundleRelease and assembleRelease.

apk works fine until i try to make payment.

My conclusion : when apk goes to the RazorpayCheckout.open function call app crashes. I dont know how to debug that and hit a dead end here.

How to implement voiceover/Talkback accessibility in react-native webview?

$
0
0

I need to implement an accessibility feature of Voiceover(ios) or talkback(android) in React-native webview for both android and ios.

I am facing two issues:

1: I have div's and paragraphs (p tag) whose content has been read out by device. But I need to add some string as prefix or postfix in those.

Example

code is: <div> Hey Tap me to see magic </div>

Spoken content needed: 1 element of list "Hey Tap me to see magic" click to perform xyz action

.

2: Whenever action happen (i.e. on double tap of element) Device should speak:"Magic has happened"

What I have tried

I have tried using speechSynthesis of HTML% Text to Speech:var msg = new SpeechSynthesisUtterance('Hello World');window.speechSynthesis.speak(msg);

This approach is working for my 2nd issue in ios (iphone X),But No response in android devices

Thanks

Viewing all 28479 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>