Android Question Geo Location

fishwolf

Well-Known Member
Licensed User
Longtime User
i use LocationLibrary 1.10 library and now i have this error

B4X:
scheduler_service_start (java line: 694)
java.lang.SecurityException: "network" location provider requires ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission.
    at android.os.Parcel.readException(Parcel.java:1683)
    at android.os.Parcel.readException(Parcel.java:1636)
    at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:614)
    at android.location.LocationManager.requestLocationUpdates(LocationManager.java:898)
    at android.location.LocationManager.requestLocationUpdates(LocationManager.java:474)
    at com.rootsoft.locationmanager.LocationManager1.requestMobileLocation(LocationManager1.java:82)

any suggestions?
 

fishwolf

Well-Known Member
Licensed User
Longtime User

Ok, i have resolved the localization permission.

I have to also the store the images into the picture gallery, how to enable this permission?

B4X:
Dim DestinationPath As String

    DestinationPath = File.Combine(File.DirRootExternal, "Pictures/MyApp")
   
    If File.Exists(DestinationPath, "") == False Then
        File.MakeDir(File.Combine(File.DirRootExternal, "Pictures"), "MyApp")
    End If
   
    File.Copy(File.DirInternalCache, SourceFile, File.Combine(File.DirRootExternal, "Pictures/MyApp"), DestinationFile)


    ToastMessageShow("Image downloaded", True)
   
   
   
Dim MyIntent As Intent
Dim MyPhone As Phone

    MyIntent.Initialize("android.intent.action.MEDIA_SCANNER_SCAN_FILE", "file://" & File.Combine(File.DirRootExternal, "Pictures/MyApp/" & DestinationFile))
   
    MyPhone.SendBroadcastIntent(MyIntent)
   
   
End Sub
 
Upvote 0

fishwolf

Well-Known Member
Licensed User
Longtime User
There is no problem with runtimepermissions if you implement it correctly.
You need to use runtimepermissions starting from sdk 23, yes.

See link above in Post #2
yes, i use sdk 26

I have to also the store the images into the picture gallery, how to enable this permission?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
You should create a new thread for any new question.

this thread is about geo location and the needed runtimepermission.
Don´t expect me to answer any other question until you got familar with runtimepermissions.
BTW the forumsearch is working. Did you ever tried to use it to maybe find an answer to your question?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…