CN111381923A - Interaction method, system, device and medium of RN and Android - Google Patents

Interaction method, system, device and medium of RN and Android Download PDF

Info

Publication number
CN111381923A
CN111381923A CN202010166840.0A CN202010166840A CN111381923A CN 111381923 A CN111381923 A CN 111381923A CN 202010166840 A CN202010166840 A CN 202010166840A CN 111381923 A CN111381923 A CN 111381923A
Authority
CN
China
Prior art keywords
page
android
native
jump
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010166840.0A
Other languages
Chinese (zh)
Inventor
朱小军
李梁
滑立栋
王彬彬
韩晓芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Jinxi Intelligent Technology Co ltd
Original Assignee
Suzhou Jinxi Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Jinxi Intelligent Technology Co ltd filed Critical Suzhou Jinxi Intelligent Technology Co ltd
Priority to CN202010166840.0A priority Critical patent/CN111381923A/en
Publication of CN111381923A publication Critical patent/CN111381923A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides an interaction method, a system, a device and a medium of RN and Android, which can realize that only a reactive native specified page is directly jumped from an Android native page and avoid the phenomenon of page opening delay, and the method comprises the following steps: step 1: triggering jump from the Android native page to a designated page of the reactive native; step 2: sending an event from the Android native page; and step 3: a reactive native monitors an event and acquires a page jump parameter; and 4, step 4: and the reactive native skips to the specified page according to the page skipping parameter in the event.

Description

Interaction method, system, device and medium of RN and Android
Technical Field
The invention relates to the technical field of read-native and Android hybrid development, in particular to an RN and Android interaction method, system, device and medium.
Background
Currently, APP development mainly includes Android and ios development, two sets of codes need to be developed when one APP is developed, and development cost is increased. RN (reactive-native) is a technology derived for solving the problems, developers only need to develop one set of codes, and can simultaneously generate two installation packages of Android and ios, so that the development cost is greatly reduced. But because of the relatively new technology, the method has many defects.
In the read-native and Android mixed development, it is found that when the RN page is jumped from the Android native page, only the RN home page can be jumped currently, and then the RN home page is jumped to a specified page, so that the phenomenon of page opening delay can occur, and the display effect is poor.
Disclosure of Invention
Aiming at the problems, the invention provides an interaction method, system, device and medium of RN and Android, which can realize direct jump of a designated page only of reactive native from an Android native page and avoid the phenomenon of page opening delay.
The technical scheme is as follows: a method for interaction between RN and Android is characterized by comprising the following steps:
step 1: triggering jump from the Android native page to a designated page of the reactive native;
step 2: sending an event from the Android native page;
and step 3: a reactive native monitors an event and acquires a page jump parameter;
and 4, step 4: and the reactive native skips to the specified page according to the page skipping parameter in the event.
Further, in the step 1, a jump button clicked on the Android native page is clicked, and jump from the Android native page to a designated page of a reactive native is triggered;
further, in step 2, an event name and a page jump parameter of the event are specified, and the page jump parameter includes a specified page of a reactive native of the jump.
A system for interaction between RN and Android is characterized by comprising:
the trigger module is used for triggering jump from the Android native page to a designated page of the reactive native;
the event sending module is used for sending an event from the Android native page;
the monitoring module is used for monitoring event events and acquiring page jump parameters;
and the page jump module is used for jumping to a specified page according to the page jump parameter in the event.
Further, the trigger module triggers the jump from the Android native page to the reactivatable specified page by clicking a jump button on the Android native page.
Further, the event sending module can specify an event name and a page jump parameter of the event, and the page jump parameter includes a specific page of a reactive native of the jump
A device for interaction between RN and Android is characterized by comprising: comprising a processor, a memory, and a program;
the program is stored in the memory, and the processor calls the program stored in the memory to execute the RN and Android interaction method.
A computer-readable storage medium characterized by: the computer readable storage medium is configured to store a program configured to perform the above-mentioned method for the RN to interact with the Android.
By adopting the method, when the jump from the Android native page to the designated page of the reactivating native is triggered, the event is sent from the Android native page, the reactivating native monitors the event, the page jump parameter is obtained, the page jump parameter is transmitted through the event monitoring between the Android native page and the RN page, and the reactivating native jumps to the designated page according to the page jump parameter in the event, so that when the jump from the Android native page to the designated page of the reactivating native is realized, the reactivating native does not jump back to the first page and then jumps to the designated page, and can directly jump to the designated page of the reactivating native, the page loading duration is reduced, the phenomenon of page opening delay is avoided, the page jump effect is optimized, and the user experience is improved.
Drawings
FIG. 1 is a flowchart of a method for interaction between RN and Android of the present invention;
fig. 2 is a block diagram of the constituent modules of the RN and Android interaction system of the present invention.
Detailed Description
Referring to fig. 1, the method for interaction between RN and Android of the present invention includes the following steps:
step 1: clicking a jump button clicked on the Android native page to trigger the jump from the Android native page to a designated page of a reactive native;
step 2: sending an event from an Android native page, and specifying an event name and a page jump parameter of the event, wherein the page jump parameter comprises a specific page of a returned native;
and step 3: a reactive native monitors an event and acquires a page jump parameter;
and 4, step 4: and the reactive native skips to the specified page according to the page skipping parameter in the event.
By adopting the method in the embodiment, when the jump from the Android native page to the designated page of the reactivating native is triggered, the event is sent from the Android native page, the reactivating native monitors the event, the page jump parameter is obtained, the page jump parameter is transmitted through event monitoring between the Android native page and the RN page, and the reactivating native jumps to the designated page according to the page jump parameter in the event, so that when the jump from the Android native page to the designated page of the reactivating native is realized, the reactivating native does not jump back to the first page and then jumps to the designated page, and can directly jump to the designated page of the reactivating native, the page loading duration is reduced, the phenomenon of delaying of opening the page is avoided, the page jump effect is optimized, and the user experience is improved.
In an embodiment of the present invention, a system for interaction between an RN and an Android is further provided, including:
the trigger module 1 is used for triggering the jump from the Android native page to a designated page of a reactive native by clicking a jump button on the Android native page;
the event sending module 2 is used for sending an event from an Android native page, the event sending module 2 can specify an event name and a page jump parameter of the event, and the page jump parameter comprises a specific page of a returned native;
the monitoring module 3 is used for monitoring event events and acquiring page jump parameters;
and the page jump module 4 is used for jumping to a specified page according to the page jump parameter in the event.
In an embodiment of the present invention, a device for interaction between an RN and an Android is further provided, which includes: comprising a processor, a memory, and a program;
and the processor calls the program stored in the memory to execute the RN and Android interaction method.
The apparatus may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that the present embodiment is merely an example of an apparatus, and does not constitute a limitation of the apparatus, and may include more or less components than the present embodiment, or combine some components, or different components, for example, may further include an input/output device, a network access device, and the like.
The Memory may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory is used for storing programs, and the processor executes the programs after receiving the execution instructions.
The processor may be an integrated circuit chip having signal processing capabilities. The processor may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like. The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Data processing programs for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The data processing program may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In an embodiment of the present invention, a computer-readable storage medium configured to store a program configured to perform the above-mentioned method for the RN to interact with the Android is further provided.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a system, method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the invention. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart.
The method for interaction between the RN and the Android, the system for interaction between the RN and the Android, the device for interaction between the RN and the Android and the application of a computer-readable storage medium provided by the invention are described in detail above, specific examples are applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiments is only used to help understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A method for interaction between RN and Android is characterized by comprising the following steps:
step 1: triggering jump from the Android native page to a designated page of the reactive native;
step 2: sending an event from the Android native page;
and step 3: a reactive native monitors an event and acquires a page jump parameter;
and 4, step 4: and the reactive native skips to the specified page according to the page skipping parameter in the event.
2. The method for interaction between RN and Android of claim 1, comprising: in the step 1, a jump button clicked on the Android native page is clicked, and jump from the Android native page to a designated page of a reactive native is triggered.
3. The method for interaction between RN and Android of claim 1, comprising: in step 2, an event name and a page jump parameter of the event are specified, wherein the page jump parameter comprises a specified page of a returned native.
4. A system for interaction between RN and Android is characterized by comprising:
the trigger module is used for triggering jump from the Android native page to a designated page of the reactive native;
the event sending module is used for sending an event from the Android native page;
the monitoring module is used for monitoring event events and acquiring page jump parameters;
and the page jump module is used for jumping to a specified page according to the page jump parameter in the event.
5. The system of claim 4, wherein the RN interacts with the Android by: and the trigger module triggers the jump from the Android native page to the reactivatable specified page by clicking a jump button on the Android native page.
6. The system of claim 4, wherein the RN interacts with the Android by: the event sending module can specify an event name and a page jump parameter of an event, and the page jump parameter comprises a specific page of a realnative to jump.
7. A device for interaction between RN and Android is characterized by comprising: comprising a processor, a memory, and a program;
the program is stored in the memory, and the processor calls the program stored in the memory to execute the RN and Android interaction method.
8. A computer-readable storage medium characterized by: the computer readable storage medium is configured to store a program configured to perform the above-mentioned method for the RN to interact with the Android.
CN202010166840.0A 2020-03-11 2020-03-11 Interaction method, system, device and medium of RN and Android Pending CN111381923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010166840.0A CN111381923A (en) 2020-03-11 2020-03-11 Interaction method, system, device and medium of RN and Android

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010166840.0A CN111381923A (en) 2020-03-11 2020-03-11 Interaction method, system, device and medium of RN and Android

Publications (1)

Publication Number Publication Date
CN111381923A true CN111381923A (en) 2020-07-07

Family

ID=71217175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010166840.0A Pending CN111381923A (en) 2020-03-11 2020-03-11 Interaction method, system, device and medium of RN and Android

Country Status (1)

Country Link
CN (1) CN111381923A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555181A (en) * 2018-03-30 2019-12-10 武汉斗鱼网络科技有限公司 Page cross-skip method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555181A (en) * 2018-03-30 2019-12-10 武汉斗鱼网络科技有限公司 Page cross-skip method and device

Similar Documents

Publication Publication Date Title
US9354856B2 (en) Software installation method and device
CN111176626B (en) Cross-programming-language code calling method and device, medium and equipment
US10481964B2 (en) Monitoring activity of software development kits using stack trace analysis
US20070074168A1 (en) Automated step type determination
CN107092475B (en) Calling method and device of interactive control
CN107016282B (en) information processing method and device
CN107678782B (en) Process protection method, device, equipment and computer readable storage medium
CN109558304B (en) Component association analysis method and device and electronic equipment
US20130067439A1 (en) Injecting faults into program for testing
CN111124544A (en) Interface display method and device, electronic equipment and storage medium
CN114880159B (en) Data processing method, device, equipment and storage medium
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN106610845B (en) Information management method, device, server and system
CN108509228B (en) Page loading method, terminal equipment and computer readable storage medium
CN114356779A (en) Programming language debugging method and device and terminal equipment
CN116627850B (en) Function debugging method and device, storage medium and electronic equipment
CN111381923A (en) Interaction method, system, device and medium of RN and Android
CN111026667B (en) Script execution method and device and electronic equipment
CN114327375A (en) Method, tool and computer equipment for detecting java code dependency relationship
CN111242731B (en) Service execution method and device
CN113127329B (en) Script debugging method and device and computer storage medium
CN109684191B (en) Application package construction method, device and equipment and readable storage medium
AU2013206622B2 (en) Download management method and device based on Android browser
CN112214392A (en) JS code debugging method, device, terminal and storage medium
CN110990167A (en) Front-end communication method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination