English 中文(简体)
• 如何自动遵守SMS在反应性案文投入中收到的时间代码
原标题:How to automatically paste the one time code which is received in SMS in react-native text input

我正在使用反应堆的投稿。 我怎么能够自动地在文稿箱中封顶或密码。

问题回答

• 自动从SOS的烟ms中挥发,用于采取下列步骤:

  1. Set textContentType="oneTimeCode"(supported only for iOS devices):
  1. You need to Send sms with the following pattern: <#> code: your otp here.

for e.g we send an sms in your company like this: <#> code: 1234.

P.S.,我还有汽车主食 ={true}在我的投入上。

如果其他人想如何在流动浏览器中改造土著网络,你就不需要文字。 这只是一种推进剂。 你可以这样做,只是把你的意见集中起来。 用户在使用该守则时,该代码将自动填满任何投入。

   <TextInput
     autoFocus={true}
     value={value}
     caretHidden={true}
     onChangeText={onChangeText}
     keyboardType="number-pad"
     />

页: 1 [EDIT 2023-01-22] 有些人(@TaiyrBegeyev)说,它有key板Type=“编号-pad”,但我可以再次尝试这样做,......你的行动!

如您需要处理该守则,则在文本中添加一个<条码>。

and FINALLY, the most important, if you don t see iOS poping up your code coming from SMS, check which message you re sending. In my case, in French,

  • Veuillez saisir le code ${code} dans l application is working
  • Veuillez entrer ce code dans l application : ${code} is NOT working

我先检查RN一侧,最后修改SMS是解决办法。

创建新的路线,并沿用这一守则,并在u 发送其自动填充的核查代码后加以尝试

import { useState } from "react";
import {
  Keyboard,
  Text,
  TextInput,
  TouchableWithoutFeedback,
  View,
} from "react-native";
const Contacts = () => {
  const [value, onChangeText] = useState("");
  return (
    <TouchableWithoutFeedback
      onPress={() => {
        Keyboard.dismiss();
      }}
    >
      <View style={{ flex: 1 }}>
        <TextInput
          // autoFocus={true}
          value={value}
          onChangeText={onChangeText}
          keyboardType="number-pad"
        />
        <Text>contacts</Text>
      </View>
    </TouchableWithoutFeedback>
  );
};
export default Contacts;




相关问题
Jquery .keypress on a dynamically added input

I am currently adding an input via a .click event and then wanting to listen to any keypress that occurs on this input. However, the appended isn t firing any events after it is inserted (i.e. blur, ...

How to read input from the keyboard in Objective-C

Hi I am making a program that gets input from the keyboard and I was wondering if there was any way to get input from the keyboard and store it in an NSString object.

set a value to a textbox which had focus in javascript

Hai guys, I have three textboxes and one listbox... If the user clicks the first textbox and then click a list item the selected item must be set as value to the textbox... I want this in ...

Flex: Text Input that accepts number only

Need a code that only accepts numbers. Upon inputting, the code must check if it is number, if not, it must remove the entered key or not enter it at all

HTML text input event

I have a form, and want to disable/enable its submit button depending on whether the form s input text fields are empty or have had text entered into them. I think this means having an event handler ...