Android Question File.DirAssets and File.DirInternal - SearchView

trepdas

Active Member
Licensed User
what are the differences between these ?
how do I copy a file that is in dirinternal into dirassets ?



I am trying to implement the two searchviews.

my dat files (lang1.txt and lang2.txt) are in dirinternal.




B4X:
Private Sub LoadIndices
    Dim ser As B4XSerializator
    ser.Tag = 1
    ser.ConvertBytesToObjectAsync( _
        Bit.InputStreamToBytes(File.OpenInput(File.DirAssets, "lang1.txt")), "ser")
End Sub


So, firstindex and secondindex returns NULL here and therefore the Searchview is not loading :

B4X:
Sview.Initialize(Me, "Sview")
    Sview.AddToParent(SVPanel, 0, 300, SVPanel.Width, SVPanel.Height)
    If firstIndex <> Null Then Sview.LoadFirst(firstIndex)
    If secondIndex <> Null Then Sview.LoadSecond(secondIndex)



how do I move them into dirassets ?

or fix it ?

Thank you
 

trepdas

Active Member
Licensed User
ah.
Thank you my savior.

so, if the files (lang1.txt and lang2.txt) are by default in the dirassets...


why does firstindex returns NULL ?


I work with an emulator and not with phone. does it matter?
 

Attachments

  • tmp.jpg
    221 KB · Views: 242
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…