×

Compatibility method based on hybrid, adapter, operation device, system and computer-readable storage medium

  • US 10,635,436 B2
  • Filed: 06/29/2017
  • Issued: 04/28/2020
  • Est. Priority Date: 03/14/2017
  • Status: Active Grant
First Claim
Patent Images

1. A compatibility method based on Hybrid frameworks, wherein, the method comprises:

  • a JS adaptation component of a first Hybrid framework acquires a second component data from a JS component of a second Hybrid framework, and the second component data comprises a class name and a method name of a native component of the second Hybrid framework for executing a current business;

    the JS adaptation component encapsulates the second component data as a parameter data packet applicable for the first Hybrid framework;

    the JS adaptation component transmits a first component data to a bridge module of the first Hybrid framework, and the first component data comprises the parameter data packet and a pre-stored class name and method name of the native adaptation component of the first Hybrid framework corresponding to the JS adaptation component, and the class name and the method name of the native adaptation component are used for the bridge module of the first Hybrid framework to invoke an interface of the corresponding native adaptation component for data transmission;

    the corresponding native adaptation component acquires the parameter data packet in the first component data from the bridge module of the first Hybrid framework;

    the native adaptation component parses the parameter data packet to acquire the class name and the method name of the native component of the second Hybrid framework;

    the native adaptation component invokes an interface of the corresponding native component of the second Hybrid framework according to the class name and the method name of the native component of the second Hybrid framework and according to a preset calling rule of the native component of the second Hybrid framework to implement data transmission, so that the native component of the second Hybrid framework executes the current business;

    wherein, the method further comprises;

    the native adaptation component acquires a post-mission callback data from the native component of the second Hybrid framework;

    the native adaptation component encapsulates the post-mission callback data as a callback data applicable for the first Hybrid framework according to a preset callback rule of the first Hybrid framework;

    the native adaptation component sends the encapsulated callback data to the bridge module of the first Hybrid framework;

    the JS adaptation component acquires the callback data from the bridge module of the first Hybrid framework;

    the JS adaptation component sends the acquired callback data to the JS component of the second Hybrid framework according to a preset callback rule of the JS component of the second Hybrid framework.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×