[B4A] - AH_TakeScreenShot - Take a screenshot (Library)
Hi all, You can take a screenshot of the screen with a single line of code. in the next version you can take a screen shot with desired view. this zip file have a library and a sample. Currently version v1.0 (2021/05/23) Private Sub BTN_ScreenShot_Click Dim bitmap As Bitmap...
www.b4x.com
Grazie a questa libreria, è possibile eseguire uno screenshot ed eventualmente salvarlo su memoria del dispositivo, ma non riesco perchè ho provato a modificare l'editor con questo codice, ma continua a mostrare l'errore in basso... in allegato il progetto... grazie in anticipo per l'aiuto..
Manifest Editor:
AddManifestText(
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
errore:
Error occurred on line: 47 (Main)
java.io.FileNotFoundException: /storage/emulated/0/.jpg (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:308)
at java.io.FileOutputStream.<init>(FileOutputStream.java:238)
at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:449)
at b4a.examplewef.main._saveimagetodisc(main.java:449)
at b4a.examplewef.main._btn_screenshot_click(main.java:419)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:7352)
at android.widget.TextView.performClick(TextView.java:14230)
at android.view.View.performClickInternal(View.java:7318)
at android.view.View.access$3200(View.java:846)
at android.view.View$PerformClick.run(View.java:27800)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7050)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)