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
package com.example.yourapp; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import com.example.yourapp.AuthenticationModel; | |
import retrofit.client.Header; | |
import retrofit.client.OkClient; |
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.io.IOException; | |
import okhttp3.HttpUrl; | |
import okhttp3.Interceptor; | |
import okhttp3.OkHttpClient; | |
import okhttp3.Request; | |
/** An interceptor that allows runtime changes to the URL hostname. */ | |
public final class HostSelectionInterceptor implements Interceptor { | |
private volatile String host; |
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
{ | |
"basics": { | |
"name": "John Doe", | |
"label": "Programmer", | |
"picture": "", | |
"email": "john@gmail.com", | |
"phone": "(912) 555-4321", | |
"website": "http://johndoe.com", | |
"summary": "A summary of John Doe...", | |
"profiles": [ |
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
public static byte[] hexStringToByteArray(String s) { | |
int len = s.length(); | |
byte[] data = new byte[len / 2]; | |
for (int i = 0; i < len; i += 2) { | |
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) | |
+ Character.digit(s.charAt(i + 1), 16)); | |
} | |
return data; | |
} | |
// Ref: https://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java/140861#140861 |
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
package com.naat.codinaat.utils | |
import android.util.Base64 | |
import android.util.Log | |
import javax.crypto.Cipher | |
import javax.crypto.spec.IvParameterSpec | |
import javax.crypto.spec.SecretKeySpec | |
object Aes128 { |
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
public class MoneyEditText extends TextInputEditText { | |
public MoneyEditText(Context context) { | |
super(context); | |
} | |
public MoneyEditText(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} |
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
InputFilter filter = new InputFilter() { | |
public CharSequence filter(CharSequence source, int start, int end, | |
Spanned dest, int dstart, int dend) { | |
for (int i = start; i < end; i++) { | |
if (!Character.isLetterOrDigit(source.charAt(i))) { | |
return ""; | |
} | |
} | |
return null; | |
} |
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
package com.aboolean.sosmex.dependencies.feature | |
import com.aboolean.sosmex.ui.home.menu.MenuItem | |
import com.aboolean.sosmex.utils.di.Country | |
import java.util.* | |
interface FeatureConfig { | |
val appId: String | |
val defaultLocale: Locale | |
val isCountryChooseEnabled: Boolean |
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
val appName = getString(R.string.app_name) | |
val placeHolder = getString(R.string.message_sos_alert_placeholder, "displayName", appName, featureConfig.shortCutAppUrl) | |
SmsReceiver.sendSMS(this, "5543136233", "Monica Vargas Velasco necesita ayuda a través de SOSMex descarga la app https://bit.ly/2TVb2bt http://maps.google.com/maps?f=q&q=(19.3832352,-99.0738685)") |
OlderNewer