Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View newarifrh's full-sized avatar
:octocat:
Working from home

Arif Rahman Hakim newarifrh

:octocat:
Working from home
View GitHub Profile
🌞 Morning 95 commits ████▊░░░░░░░░░░░░░░░░ 22.6%
🌆 Daytime 103 commits █████▏░░░░░░░░░░░░░░░ 24.5%
🌃 Evening 197 commits █████████▊░░░░░░░░░░░ 46.9%
🌙 Night 25 commits █▏░░░░░░░░░░░░░░░░░░░ 6.0%
{
"base_url": "https://admin.ustreetaja.com/"
}
public static boolean isMockLocationOn(Location location, Context context) {
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
return location.isFromMockProvider();
} else {
String mockLocation = "0";
try {
mockLocation = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION);
} catch (Exception e) {
e.printStackTrace();
}
@newarifrh
newarifrh / custom_shadow.xml
Created January 24, 2020 01:08
Custom shadow
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
///Shadow Top
<item>
<shape
android:shape="rectangle">
<stroke android:width="3dp" android:color="#88FFFFFF" />
<padding android:top="3dp"/>
<corners android:radius="10dp"/>
</shape>
package ks.stis.simpus.service;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationManager;
import android.graphics.Color;
import android.nfc.Tag;
import android.util.Log;
import androidx.core.app.NotificationCompat;