when the following line is ran the error is thrown
maybe this can not be done in a service???
B4X:
r.Initialize(0,-400%y, cvs.Bitmap.Width, cvs.Bitmap.Height)
B4X:
** Service (starter) Create **
** Service (starter) Start **
Media Projection is starting
Error occurred on line: 62 (Starter)
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getHeight()' on a null object reference
at anywheresoftware.b4a.keywords.Common.PerYToCurrent(Common.java:644)
at b4a.example.starter._drawroundbitmap(starter.java:229)
at b4a.example.starter._service_start(starter.java:434)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:163)
at b4a.example.starter.handleStart(starter.java:102)
at b4a.example.starter.onStartCommand(starter.java:70)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3738)
at android.app.ActivityThread.-wrap23(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1744)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6780)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)