This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Path; | |
import android.support.annotation.NonNull; | |
import android.util.AttributeSet; | |
import android.widget.FrameLayout; | |
/** | |
* Frame layout that has rounded corners (it clips content too). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String encodeBitmapTobase64(Bitmap image) { | |
Bitmap immage = image; | |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
immage.compress(CompressFormat.PNG, 100, baos); | |
String imageEncoded = Base64.encodeToString(baos.toByteArray(), 0); | |
Log.d("Image Log:", imageEncoded); | |
return imageEncoded; | |
} | |
public static Bitmap decodeBase64ToBitmap(String input) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.support.v4.app.NotificationCompat; | |
import com.squareup.picasso.Picasso; | |
import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.Manifest; | |
import android.support.annotation.RequiresPermission; | |
import android.util.Log; | |
import com.google.gson.GsonBuilder; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.Locale; | |
import java.util.concurrent.TimeUnit; |