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 AlertDialog showConfirmDialog(String message, Context context, | |
String btnPositiveName, final DialogInterface.OnClickListener okClickListener, | |
String btnNegavtiveName, final DialogInterface.OnClickListener cancelClickListener) { | |
TextView msgView = new TextView(context); | |
msgView.setText(message); | |
msgView.setTextSize(18); | |
msgView.setPadding(100, 10, 10, 10); | |
msgView.setGravity(Gravity.LEFT); | |
msgView.setTextColor(Color.BLACK); |
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 com.onesignal.OneSignal; | |
public class YourAppClass extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
// OneSignal Initialization | |
OneSignal.startInit(this) | |
.inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification) |
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
https://www.programcreek.com/java-api-examples/android.content.ComponentName | |
------------ | |
public void openApplication(Context context, String packageName) { | |
PackageInfo pi; | |
try { | |
pi = context.getPackageManager().getPackageInfo(packageName, 0); | |
} catch (PackageManager.NameNotFoundException e) { | |
pi = null; | |
e.printStackTrace(); |
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
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android | |
keytool -exportcert -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator\.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64 | |
keytool -exportcert -alias <RELEASE_KEY_NAME> -keystore D:\Github_Code\Chambu-Android-New\app\certificate\Chambu_keystore | "C:\OpenSSL\bin\openssl" sha1 -binary | "C:\OpenSSL\bin\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
https://stackoverflow.com/questions/20402818/build-android-release-apk-on-phonegap-3-x-cli | |
http://docs.phonegap.com/phonegap-build/signing/android/ | |
https://gist.github.com/rocco/59e98b10643d55b11bc3 | |
https://chris-allen-lane.com/blog/post/phonegap-compiling-a-release-apk-without-using-phonegap-build | |
https://cordova.apache.org/docs/en/latest/guide/platforms/android/upgrade.html |
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
/** | |
* Check the device to make sure it has the Google Play Services APK. If | |
* it doesn't, display a dialog that allows users to download the APK from | |
* the Google Play Store or enable it in the device's system settings. | |
*/ | |
private boolean checkPlayServices() { | |
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance(); | |
int resultCode = apiAvailability.isGooglePlayServicesAvailable(this); | |
if (resultCode != ConnectionResult.SUCCESS) { | |
if (apiAvailability.isUserResolvableError(resultCode)) { |
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
https://documentation.onesignal.com/docs/customize-notification-icons |
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
https://codeburst.io/android-swipe-menu-with-recyclerview-8f28a235ff28 |
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
// Put this in your actvity or fragment | |
ViewUtils.showConfirm("Are you sure you want to logout?", getActivity(), new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int which) { | |
AppSetting.getCurrent().clearLogin(); | |
App.showLogin(getActivity()); | |
} | |
}, 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
https://github.com/zetbaitsu/Compressor | |
https://github.com/nanchen2251/CompressHelper |
NewerOlder