Android Question Error to save in dir rootexternal.

fifiddu70

Well-Known Member
Licensed User
Longtime User
hello to all, I installed on my pc version 8.0 of b4a I created an app and I added a banner and an interstitial of admob, in this app I need to use the dirrootexternal to save a photo and then share it on facebbok with the library messahrelibrary, when I launch the application in release I get this error: class file for com.google.android.gms.ads.AdView not found if instead I disable the runtimepermission library this error I do not receive it anymore, why? I tried to do everything that describe in the various posts but I could not make it work, can someone help me? do you have a working project where I can take an example and copy it on my project? please i'm really in trouble, i'm 3 days trying to solve the problem.
 

asales

Expert
Licensed User
Longtime User
I added a banner and an interstitial of admob
- Did you updated the FirebaseAdmob lib (1.51)?
- Did you used the new CreateResourceFromFile macro feature to add the snippets to the manifest?

in this app I need to use the dirrootexternal to save a photo and then share it on facebbok with the library messahrelibrary
- What is targetSdkVersion?
- I use this code to share a image in Facebook (need to implement FileProvider):
https://www.b4x.com/android/forum/threads/share-image-using-facebook-app.54686/#content

I can take an example and copy it on my project?
Create a example and put the project here to others test and try to find the problem.
 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
then I solved the problem of the banner with admob using the library firebase and disabling the old library, it remains only a problem if I want to use
the dirrootexternal and inserting the library runtimepermission practically returns me this error that maybe it is because I do not insert well the code of permission:
main_imgshare_click (java line: 992)
java.io.FileNotFoundException: /storage/emulated/0/biglietto.jpg: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:487)
at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:448)
at com.partannasoftware.Boarding.main._imgshare_click(main.java:992)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:5265)
at android.view.View$PerformClick.run(View.java:21534)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:473)
... 17 more
 
Upvote 0
Top