|
沙发
楼主 |
发表于 2024-6-22 11:56:55
来自手机
|
只看该作者
沙发 心灵亮光说: require "import"
import "android.content.Intent"
import "android.graphics.Bitmap"
import "android.net.Uri"
import "java.io.File"
import "java.io.FileOutputStream"
local t = {"焦点识别", "全屏识别"}
function sbcd(mode)
app_pkg = "com.google.android.apps.accessibility.reveal"
store_url = "market://details?id="
if mode == "焦点识别" then
this.getScreenShot(node, {
onScreenCaptureDone = function(A0_4)
A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
end
})
else
this.getScreenShot({
onScreenCaptureDone = function(A0_4)
A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
end
})
end
end
local dlg = LuaDialog().setItems(t).show()
dlg.onItemClick = function(l, v, p, i)
dlg.dismiss()
sbcd(t)
end
return true
来自:掌上乐园 |
|