Commit 15564d1b authored by Schoumi's avatar Schoumi

Bug Fix: thumb is null

Bug Fix: Floating Button in upload Land
parent 74d51dca
......@@ -216,7 +216,8 @@ public class NetworkManager {
String token = msg.getString("token");
String thumb = msg.getString("thumb");
//get thumbnail and transform it to useful data
thumb = thumb.substring(thumb.indexOf(","));
if(thumb != null && thumb.contains(","))
thumb = thumb.substring(thumb.indexOf(","));
byte[] thumbData = Base64.decode(thumb, Base64.DEFAULT);
System.out.println("Data is not null? " + thumbData.length);
imgOutput = new Img(0, siteUrl, hashOutput, realHashOutput, Calendar.getInstance(), nbDays, thumbData,token);
......
......@@ -110,13 +110,4 @@
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/new_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@android:drawable/stat_sys_upload_done"
/>
</android.support.design.widget.CoordinatorLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment