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
来自解说社区客户端 |