Get app icon PNG data by bundle id (app.png_data_for_bid)
Declaration
png_data = app.png_data_for_bid(bid)
Parameters
- bid
String. App bundle identifier. You can find it inXXT App -> More -> App List
.
Returns
- png_data
String | nil. PNG binary data of the app icon, or nil if the app does not exist.
Example
-- Save WeChat icon to photo album
image.load_data(app.png_data_for_bid("com.tencent.xin")):save_to_album()
Note: uses non-chapter APIs image.load_data
and :save_to_album
.