Skip to content

Instantly share code, notes, and snippets.

View Ahmedbadereldin's full-sized avatar
🏠
Working from home

Ahmed M Bader El-Din Ahmedbadereldin

🏠
Working from home
View GitHub Profile
@Ahmedbadereldin
Ahmedbadereldin / keysInLocalProperties.md
Created September 4, 2020 11:48
Hiding API keys in local.properties

Hiding API keys in local.properties

  1. Add the API key to your local.properties file:
apiKey=<value>
serverKey=<value>
mapKey=<value>
final private String FCM_API = "https://fcm.googleapis.com/fcm/send";
final private String serverKey = "key=" + "AAAA.....";
final private String contentType = "application/json";
String TOPIC;
////////////
TOPIC = "/topics/user_" + messageSendToUser.getId(); //topic has to match what the receiver subscribed to
@Ahmedbadereldin
Ahmedbadereldin / AndroidNetworking.java
Last active September 1, 2020 08:13
upload file with AndroidNetworking
Map<String, File> multiPartFileMap = new HashMap<>();
if (!PathHolder.equals("")) {
multiPartFileMap.put("attachment", new File(PathHolder));
}
Map<String, String> parames = new HashMap<>();
parames.put("name", name);
parames.put("email", email);
parames.put("message", details);
parames.put("subject", subject);
package com.ennervoice.user.Utils;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
#--------
-keep class com.jumio.** { *; }
-keep class jumio.** { *; }
-keep class com.microblink.** { *; }
-keep class com.microblink.**$* { *; }
-keep class com.facetec.zoom.** { *; }
-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
-keep class org.bouncycastle.** {*;}
// ApiInterface
@Multipart
@POST("user/add-image")
Call<ResultAPIModel<MemberModelX>> uploadProfileImage(@HeaderMap() Map<String, Object> headerParams, @Part MultipartBody.Part image);
public void uploadImage(String uri) {
File file = new File(uri);
package com.techzone.moshtapp.chating;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
@Ahmedbadereldin
Ahmedbadereldin / Image Picker In Android 10
Created October 13, 2019 19:08
When I needed to arrive for the first time to storage in Android 10 , I met many problems from this probleams : Knowing that these problems after I give the permission.
When I needed to arrive for the first time to storage in Android 10 , I met many problems from this probleams :
Knowing that these problems after I give the permission.
* in this example using media-picker-android libray
Link : https://github.com/iamthevoid/media-picker-android
1- open failed: EACCES (Permission denied)
* when you show this probleam you need added this lines in your mainfist
<application
...
@Ahmedbadereldin
Ahmedbadereldin / Ahmed M Bader El-Din
Last active March 19, 2020 11:37
Ahmed M Bader El-Din
https://play.google.com/store/apps/details?id=com.techzone.moshtapp
https://play.google.com/store/apps/details?id=com.app.linkme
https://play.google.com/store/apps/details?id=com.daleni.usersapp
https://play.google.com/store/apps/details?id=com.canny.canny.cannycustomer
https://play.google.com/store/apps/details?id=com.ahmedbadereldin.hp.phonexworkerapp
https://play.google.com/store/apps/details?id=com.techzone.shaghe
https://play.google.com/store/apps/details?id=com.ibtikarat.tahadi
https://play.google.com/store/apps/details?id=com.sanedapp.efhasapp
https://play.google.com/store/apps/details?id=com.eie.arfuf
https://play.google.com/store/apps/details?id=com.ennervoice.user
@Ahmedbadereldin
Ahmedbadereldin / Open WhatsApp Messaging
Last active August 6, 2019 09:04
this code open whatsapp to send message direct from your app to whatsapp (^_^)
String number = "+970598074212"
/////////////////////////////////////////////////////////////
btn_send_message_whatsapp.setOnClickListener(v -> {
onClickWhatsApp("970598074212");// hint without +
// if the number with + like +970598074212
//using
//onClickWhatsApp(number.substring(1));
});
///////////////////////Open Whatsapp////////////////////////