This file contains 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 java.util.Date; | |
public class RequestCodeGenerator { | |
public RequestCodeGenerator() {} | |
public int getCode() { | |
long timestamp = new Date().getTime(); | |
return Math.abs( (int) timestamp % 100000 ); | |
} |
This file contains 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.graphics.Point; | |
import android.view.WindowManager; | |
/* | |
@author Filip Bongcam | |
DEVICE METRICS | |
Collects useful data of the device physical screen and window components |
This file contains 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
/* | |
@author Filip Bongcam | |
--------------------- | |
Compare string against custom regex | |
@param string to analyze | |
@param regex to compare against | |
@param if comparision should be case sensitive or not | |
@return true or false |
This file contains 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
/* | |
Collection of date formats | |
@author Filip Bongcam | |
Useful for determining format of date when unknown, | |
when converting string to date | |
Usage: | |
To determine unknown format of date (as String) |