Joke Collection Website - Talk about mood - How does Android app realize WeChat sharing?

How does Android app realize WeChat sharing?

Use WeChat SDK to share the data of WXAppExtendObject with friends, and friends click to jump to a page of MyApp (when sharing, you need to pass parameters to construct jump intention).

1. This type of sharing (see WeChat Sharing SDK for details) can take several parameters, and the parameters must be accompanied by some data to construct the jump intention.

2. Friends click on the shared content and call back the onReq method of the class of the IWXAPIEventHandler interface, as follows.

Constanta Pi. Command _ showmessage _ from _ wx: This will be called. At this time, you can take out some data attached to the sharing parameters, construct a jump intention, and call startActivity(intent) to open MyApp.

Because it is the actual measurement of the project, the screenshot of this implementation method will not be transmitted.

Question 1: This sharing method can only be shared with friends, but not with friends.

Question 2: If a friend doesn't install MyApp, there is no response after clicking on the message shared by friends in WeChat, so it is impossible to remind "MyApp is not installed, please download it", because these logics are written in MyApp itself without installation and cannot be detected.

Question 3: 3: The sharing of WxappextendObject type, the data has a size limit,

ExtInfo(String) limits 2 KB;

Binary data of third-party FileData(byte[]) file, maximum10m; ;

File path: (string) the local directory of the file provided for the application, with the maximum length of 10KB and the file size as above, and no more than 10M.