Android Question an error in set ringtone code

Ramezanpour2

Member
Licensed User
im using this in my application but error happend

B4X:
        If File.Exists(File.DirInternalCache,cursor1.GetString("tanzemahang")&"zohari.txt")=False Then

        File.WriteString(File.DirInternalCache,cursor1.GetString("tanzemahang")&"zohari.txt","z")



        s = r.AddToMediaStore(File.DirRootExternal,cursor1.GetString("tanzemahang"),cursor1.GetString("id"),False,False,True,False)
        File.Copy(File.DirAssets,cursor1.GetString("tanzemahang"), File.DirRootExternal,cursor1.GetString("tanzemahang"))

        File.WriteString(File.DirInternalCache,cursor1.GetString("id")&".txt",s)
        r.SetDefault(r.TYPE_RINGTONE,s)






        Else





        Dim gt As String
        gt = File.GetText(File.DirInternalCache,cursor1.GetString("id")&".txt")
        r.SetDefault(r.TYPE_RINGTONE,gt)



        End If
 
Top