簡體   English   中英

在Android中使用CoronaActivity捕獲屏幕

[英]Capture screen using CoronaActivity in Android

我正在嘗試通過CoronaActivity在Android中捕獲屏幕,但沒有成功。 我不確定這是否可能。

嘗試過:

view = coronaActivity.getWindow().getDecorView().getRootView()
view.setDrawingCache(true)
view.compress(Bitmap.CompressFormat.PNG, 90, out)
...

只是做這樣的事情:

local function saveImage(event)
    if(event.phase=="ended") then
      local hello = display.captureScreen(true)
      hello:removeSelf()
      local alert = native.showAlert( "Success", "Screen Capture Saved to Gallery", { "Done" } )
    end
end

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM