How to judge the time when APP jumps to Mini Program?

1. I want to do APP jump Mini Program, APP account override Mini Program account function. But now do not know how to judge whether the jump is APP jump over, or by other ways to jump over, is there a corresponding event or method?
the 2.onLaunch lifecycle is triggered only once and does not meet the requirements. OnLoad is triggered many times, but it does not meet the requirements.
3. Now I just want to know the time when APP jumps to Mini Program, how to judge? Ask the great god for advice

Dec.25,2021

https://open.weixin.qq.com/cg.

String appId = "wxd930ea5d5a258f4f"; // AppId
IWXAPI api = WXAPIFactory.createWXAPI(context, appId);

WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
req.userName = "gh_d43f693ca31f"; // id
req.path = path;                  //
req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;//  
api.sendReq(req);

path can take parameters here. For example,

/ pages/index/index?type=app

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35891-2bf87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35891-2bf87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?