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 String printKeyHash(Activity context) { | |
PackageInfo packageInfo; | |
String key = null; | |
try { | |
//getting application package name, as defined in manifest | |
String packageName = context.getApplicationContext().getPackageName(); | |
//Retriving package info | |
packageInfo = context.getPackageManager().getPackageInfo(packageName, | |
PackageManager.GET_SIGNATURES); |
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.text.Editable; | |
import android.text.TextWatcher; | |
import android.widget.EditText; | |
public class PhoneNumberTextWatcher implements TextWatcher { | |
private static final String TAG = "PhoneNumberTextWatcher"; | |
private EditText editText; |
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.karconnect.app.utils; | |
import android.view.View; | |
import android.view.View.MeasureSpec; | |
import android.view.ViewGroup; | |
import android.widget.ListAdapter; | |
import android.widget.ListView; | |
/** |
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.karconnect.app.utils; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.support.v7.app.AlertDialog; | |
public class NetworkUtils { |
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.security.SecureRandom; | |
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.SecretKeySpec; | |
/** |
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
/** | |
* push fragment | |
* | |
* @param fragment fragment | |
* @param animate fragment transition animation | |
* @param shouldAdd add to back stack | |
* @param tag fragment tag | |
*/ | |
public void pushFragments(Fragment fragment, boolean animate, boolean shouldAdd, String tag) { | |
FragmentManager manager = getActivity().getSupportFragmentManager(); |
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.app.Activity; | |
import android.app.AlertDialog; | |
import android.app.ProgressDialog; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.graphics.drawable.Drawable; | |
import android.text.TextUtils; | |
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
<LinearLayout | |
... | |
xmlns:tools="http://schemas.android.com/tools" | |
tools:ignore="UnusedResources" > | |
<TextView | |
android:text="@string/str_foo_string" /> | |
</LinearLayout> |
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
For SHA: | |
keytool -list -v -keystore '/home/../.android/debug.keystore' -alias androiddebugkey -storepass android -keypass android | |
For Facebook KeyHash: | |
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64 | |
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
/** | |
* Copyright (c) 2013 Xcellent Creations, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
OlderNewer