# Scene value
Start from base library version 1.1.0. Please remaining backward compatible.
The scene value is used to describe the user's path into the Mini Program. The meaning of the full scene value is shownScene Value List。
Due to Android system restrictions, it is not yet possible to get the file by Home " Key to exit to the desktop, and then from the desktop again into the Mini Program's scene value, in this case, will retain the previous scene value.
# Get the scene value
The developer can obtain the scene values in the following ways:
- For Mini programs, it can be found in
App
ofonLaunch
andonShow
, orwx.getLaunchOptionsSync Gets the above scenario value in. - For small games, it can be found in wx.getLaunchOptionsSync and wx.onShow Get the above scene values in
# Scenarios that return the source information
You can also get the appId of the source application, Official Account message template, or Mini Program. Please refer to the reference documentation for the corresponding API for obtaining.
Scene value | scene | AppId meaning |
---|---|---|
1020 | Official Account message template profile Page Related Mini Program List | Official Account message template |
1035 | Official Account message template | Official Account message template |
1036 | App Share Message Cards | SourceApp |
1037 | Mini Program open Mini Program | Source Mini Program |
1038 | Return from another Mini Program | Source Mini Program |
1043 | Official Account message template | Official Account message template |
1069 | Mobile applications | SourceApp |