Taking screenshot of the current screen in BlackBe

2019-07-04 04:49发布

Is it possible to take a screenshot of the current screen in a BlackBerry Application? I have a button in my screen, when I click the button I want to send an email with the screenshot of the current screen.

标签: blackberry
2条回答
放我归山
2楼-- · 2019-07-04 05:06

You can take a screenshot by calling Display.screenshot(aBitmap), passing a Bitmap of the right size. There's also a version of the method that can take a screenshot of a part of the screen.

查看更多
Melony?
3楼-- · 2019-07-04 05:11

You can use the following method to get a screenshot of the displayed screen

public static Bitmap getScreenShot() {
    // get the current screen .
    Bitmap bitmap;
    bitmap = new Bitmap(Display.getWidth(), Display.getHeight());
    Display.screenshot(bitmap);
    // return the screen shot
    return bitmap;
}
查看更多
登录 后发表回答