a) Build your project at Android Studio
b) Copy the jar package from the demo project libs directory to your project and introduce the following jar libraries,class.jar is the wrapper library, the source code is in the mylibrary project, MSC and PGNPP are video libraries, and mpermissions is the third party dynamic permissions application library.
c) Create the jniLibs folder in the project src/main directory and copy the *.so suffix files in the demo project to the jniLibs folder.
d) Permissions configuration, add the following permissions in AndroidManifest.xml.
a) Initializes the network library, not blocking, and calls when the program starts
public native int initLib(int app_id, String domain, int port, String version);
app_id It is stored in the manifest file to distinguish different version channels
domain Server IP
Port Server port
Version The current version
Returen The non-zero is the error code (the error code query is in the NetInfo file)
b) Anti-initialization network library, blocking type, call at the end of program.
Returen The non-zero is the error code
public native int cleanupLib();
public native int onLogin(LoginAccount loginAccount);
Parameter description:
LoginAccount class
accountType:Account Type,qlink_id/tel/mail
account: Account
password: Password
The callback parameter: NetInfo.QHC_CMD_LOGIN_RSP
Return parameters:
0 - Success, Other - Error code
In the NetApi, there are two callback methods, and the showRecv handles the usual method callback, showVideo processing the video callback.
void showRecv(int cmd, int result, Object obj, long seq);
cmd: The command word for callback;
result: Error code 0 - Success, Other - Error code;
obj: The data returned by the JNI layer request network;
seq:It requests a code that corresponds to the seq value for each request;
void showVideo(int handle, byte[] data, int len, width, int height, int sec, int type);
handle: Open the video session;
data: Audio data (PCM data) or video data (RGB565 image data);
len: The length of the data;
width:Width of the video;
height: Video height;
type: The data type, 1 - I-frame, 2 - P-frame, 3 - audio;
Party A:Shenzhen Sanbot Innovation Cloud Technology Co., Ltd.
Party B:Developers
Whereas:
Exchanging of relevant business and technological information is required for the ongoing business discussions or cooperation between Party A and Party B with respect to ,this agreement is entered into by and between Party A and Party B through friendly consultations and under the principle of mutual benefit and joint development.
1. Article One Definition of Confidential Information
Confidential information refers to data and information with respect to relevant businesses and technologies,
whether in written or other forms, that have been disclosed by either Party A or Party B to the other party with clear label or designation of “confidential information”(hereinafter referred to as “confidential information”), excluding the following data and information:
(1) Information that is already or to be make public available,except those disclosed by either Party A or Party B or their representatives in violation of this agreement and without authorization;
(2) Non-confidential information that has come to the attention of the receiving party before the disclosure of the other party;
(3) Non-confidential information offered by either party, before the disclosure of which the receiving party is not informed of the fact that the provider of this information (a third party) has signed a binding confidentiality agreement with the party disclosing the non-confidential information under this agreement, and the receiving party may reasonably presume that the information discloser is not forbidden to offer the information to the receiving party.
2. Article Two Obligations and Liabilities
(1) Both Party A and Party B represent to the other party as the provider and receiver of confidential information, and thus both undertake confidentiality obligations and liabilities.
(2) Neither Party A nor Party B shall disclose or make public any confidential information to a third party (including the press) or otherwise make use of the confidential information without the written approval of the other party; Both parties are obliged to urge their representatives not to disclose or make public any confidential information to a third party (including the press) or otherwise make use of the confidential information; unless the disclosure, publicity and application of the confidential information is required by the due performance of the obligations of the two parties in association with the undertaking and proceeding of the cooperative programs under normal circumstances (including obligations to be assumed by both parties in the future pursuant to the law and the contracts signed by the two parties).
(3) Both parties shall strictly limit the access to the confidential information to their responsible representatives only for the purposes specified hereunder.
(4) Neither party shall provide a third party with copies or duplicates of the confidential information disclosed by the other party or its representative, whether intentionally or not, unless the disclosure is allowed by a written agreement signed by the two parties.
(5) In the event that the proceeding of the cooperative program ceases or either party quits the program with reasons, a party shall and shall urge its representatives to destroy or return to the other party all confidential information as well as all documents and materials and all duplicates thereof containing confidential information within five working days, upon the request of the other party at any time. Nevertheless, the party possessing the confidential information may keep one piece of the duplicates of the documents or materials described above only for the purpose enshrined in Article 4 hereunder, without breaching other provisions of this agreement.
(6) Either Party A or Party B shall and shall urge their respective representatives to treat the confidential information provided by the other party with a degree of care no less than that used for the similar information in its own possession. However, under no circumstances shall the treatment of the confidential information be held under a reasonable degree of care.
(7) The jar package,so file and other related documents which provided by party A and Party B can not decompilation it in any way.
(8) Any control command and middleware which provided by party A,and Party B cannot provide it to any other third party.
(9) The code which has deleted the "qh" related characters, Party B cannot provide it to any other third party.
(10) The code, robot control command and strategy which provided by party A,Party B cannot send it to third party or upload it to any open source community.
(11) The virtual machine mirror image file which provided by party A.Party B cannot send it to third party.
3. Article Three Intellectual Property Rights
Disclosure of the confidential information by either Party A or Party B to the other party or its representatives shall not be construed to constitute an assignment or grant to the other party or its representatives of the rights and interests in relation to its trade secrets, trademarks, patents, know-how or any other intellectual property, nor shall it constitute an assignment or grant to the other party or its representatives the rights and interests in relation to the trade secrets, trademarks, patents, know-how, or any other intellectual property authorized by a third party.
4. Article Four Preservation and Application of the Confidential Information
(1) Either Party A or Party B has the right to preserve necessary confidential information, so as to make use of which in implementing binding laws, regulations, and obligations under their cooperative programs.
(2) Either Party A or Party B has the right to make use of the confidential information to defend against any claims, lawsuits, judicial proceedings, and accusations towards the receiving party or its representatives in relation to the programs hereunder and relevant affairs, or to respond to summons, subpoena, or other legal proceedings with respect to the programs hereunder and relevant affairs.
(3) Either party can, in light of actual demand, disclose the confidential information in any reports, statements or certificates submitted to any regulatory organs at municipal, provincial, central, or other levels that have jurisdiction or assert having jurisdiction over the receiving party, after informing the other party in written form and making a copy for the other party of the disclosed information.
5. Article Five Dispute Settlement and Governing Laws
This agreement shall be governed by and be interpreted in accordance with the laws of the People's Republic of China. With respect to any issues, disputes, lawsuits or proceedings arising from or in connection with the rights and obligations of the parties hereunder, the two parties shall irrevocably accept the jurisdiction of the people's courts of the People's Republic of China.