Android Question Handling a file with images, as done in Basic4 PPC

HARRY

Active Member
Licensed User
Longtime User
Hi,

I am converting a program written in Basic4PPc to Basic4Android.

It goes pretty well, but I can not find how to do what I did in Basic4PPC with a file containing moon phases. Depending on date and time and location one moon phase image is displayed.

The number of the phase required is calculated by a GPSModule.

In Basic 4PPC I used a Binary File object as follows:
B4X:
FileOpen(p1,"phases.dat",cRandom)
      bin1.New1(p1,True)
    For i = 0 To 29
        ilPhase.Add(bin1.RetrieveImage)
    Next
    FileClose(p1

Then, to display a certain phase image, the following code was used:
B4X:
Image1.Image = ilPhase.Item(Round(GPSModule.mage))

Please some help to convert this code to Basic4Android.

Harry
 
Last edited:
Top