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.accounts.NetworkErrorException; | |
import android.util.Log; | |
import com.caregiver.BuildConfig; | |
import java.io.IOException; | |
import java.net.UnknownHostException; | |
import java.text.ParseException; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; |
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
buildscript { | |
repositories { | |
maven { url 'https://maven.fabric.io/public' } | |
} | |
dependencies { | |
classpath 'io.fabric.tools:gradle:1.+' | |
} | |
} | |
apply plugin: 'com.android.application' |
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
# Crashlytics - plaintext stacktrace downloaded by tilva.arth at Tue, 11 Apr 2017 15:57:05 GMT | |
# URL: ----------------------- | |
# Organization: Tilva Artsoft | |
# Platform: android | |
# Application: ---------- | |
# Version: N/A | |
# Bundle Identifier: ------------- | |
# Issue #: 8 | |
# Issue ID: 58d3ae970aeb16625bbdd17f | |
# Session ID: 58ECF7220177000151875B00241E3A3B_fcc141d1cde3468980e23278b595202f_0_v1 |
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
buildTypes { | |
debug { | |
applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
def date = new Date(); | |
def formattedDate = date.format('dd-MM-yyyy') | |
output.outputFile = new File(output.outputFile.parent, | |
output.outputFile.name.replace("-release", "-release_" + formattedDate) | |
//for Debug use output.outputFile = new File(output.outputFile.parent, |
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 Bitmap retriveVideoFrameFromVideo(String videoPath) throws Throwable { | |
Bitmap bitmap = null; | |
MediaMetadataRetriever mediaMetadataRetriever = null; | |
try { | |
mediaMetadataRetriever = new MediaMetadataRetriever(); | |
if (Build.VERSION.SDK_INT >= 14) | |
mediaMetadataRetriever.setDataSource(videoPath, new HashMap<String, String>()); | |
else | |
mediaMetadataRetriever.setDataSource(videoPath); | |
bitmap = mediaMetadataRetriever.getFrameAtTime(); |
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
String countryJson = "[{\"name\":\"Afghanistan\",\"dial_code\":\"+93\",\"code\":\"AF\"},{\"name\":\"Albania\",\"dial_code\":\"+355\",\"code\":\"AL\"},{\"name\":\"Algeria\",\"dial_code\":\"+213\",\"code\":\"DZ\"},{\"name\":\"AmericanSamoa\",\"dial_code\":\"+1 684\",\"code\":\"AS\"},{\"name\":\"Andorra\",\"dial_code\":\"+376\",\"code\":\"AD\"},{\"name\":\"Angola\",\"dial_code\":\"+244\",\"code\":\"AO\"},{\"name\":\"Anguilla\",\"dial_code\":\"+1 264\",\"code\":\"AI\"},{\"name\":\"Antarctica\",\"dial_code\":\"+672\",\"code\":\"AQ\"},{\"name\":\"Antigua and Barbuda\",\"dial_code\":\"+1268\",\"code\":\"AG\"},{\"name\":\"Argentina\",\"dial_code\":\"+54\",\"code\":\"AR\"},{\"name\":\"Armenia\",\"dial_code\":\"+374\",\"code\":\"AM\"},{\"name\":\"Aruba\",\"dial_code\":\"+297\",\"code\":\"AW\"},{\"name\":\"Australia\",\"dial_code\":\"+61\",\"code\":\"AU\"},{\"name\":\"Austria\",\"dial_code\":\"+43\",\"code\":\"AT\"},{\"name\":\"Azerbaijan\",\"dial_code\":\"+994\",\"code\":\"AZ\"},{\"name\":\"Bahamas\",\"dial_code\":\"+1 |
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
String data = "Forgot Password?"; | |
SpannableString content = new SpannableString(data); | |
content.setSpan(new UnderlineSpan(), 0, data.length(), 0); | |
.setText(content); | |
//====================// | |
String data="Underlined Text"; | |
textView.setPaintFlags(textView.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); | |
textView.setText(data); |
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
/** | |
* Created by arthtilva on 29-09-2016. | |
*/ | |
import android.util.Log; | |
import java.io.BufferedInputStream; | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
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
/***************************************************************************************/ | |
/****************************** Full Screen Theme **************************************/ | |
/***************************************************************************************/ | |
<style name="AppThemeFullScreen" parent="Theme.AppCompat.Light.NoActionBar"> | |
<item name="windowActionBar">false</item> | |
<item name="windowNoTitle">true</item> | |
<item name="android:windowFullscreen">true</item> | |
<item name="android:windowContentOverlay">@null</item> | |
</style> |
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 double EarthRadius = 6378137.0; | |
static double TwoPi = Math.PI * 2, DegreesToRadians = 0.0174532925, RadiansToDegrees = 57.2957795; | |
public static LatLng getLatLng(LatLng source, double range, double bearing) { | |
range = range * 1000; | |
double latA = source.latitude * DegreesToRadians; | |
double lonA = source.longitude * DegreesToRadians; | |
double angularDistance = range / EarthRadius; | |
double trueCourse = bearing * DegreesToRadians; |