Skip to content

Instantly share code, notes, and snippets.

View muratcanbur's full-sized avatar

Murat Can BUR muratcanbur

View GitHub Profile
import com.squareup.otto.Bus;
/**
* Created by muratcanbur on 23/06/15.
*/
public class BusProvider {
private static final Bus BUS = new Bus();
public static Bus getInstance() {
[user]
email = [email protected]
name = Salim KAYABAŞI
[core]
autocrlf = true
editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin
[color]
diff = auto
status = auto
branch = auto
@muratcanbur
muratcanbur / StethoUtil.java
Created August 23, 2015 08:56
Stetho Utility class
public final class StethoUtil {
private static boolean init = false;
private StethoUtil() {
}
public static void init(Context context) {
if (BuildConfig.DEBUG) {
public class App extends Application {
private static final AtomicReference<App> INSTANCE = new AtomicReference<>();
public static Context getContext() {
return INSTANCE.get();
}
@Override
public void onCreate() {
@muratcanbur
muratcanbur / BaseService.java
Created September 3, 2015 06:23
Creating RestInterface Class
public final class BaseService {
private BaseService() {
}
private static Builder getBuilder() {
OkHttpClient client = new OkHttpClient();
client.setConnectTimeout(BuildConfig.CONNECTION_TIMEOUT,
TimeUnit.MILLISECONDS);
client.setReadTimeout(BuildConfig.CONNECTION_TIMEOUT,
@muratcanbur
muratcanbur / RadioListFragment.java
Created October 19, 2015 12:54
RadioListFragment
public class RadioListFragment extends Fragment implements RadioListView, SwipeRefreshLayout.OnRefreshListener {
@Inject
RadioListPresenter radioListPresenter;
public RadioListFragment() {
}
public static RadioListFragment newInstance() {
RadioListFragment fragment = new RadioListFragment();
@muratcanbur
muratcanbur / MessagingService.java
Last active November 7, 2019 00:02
a background service that handles incoming FCM messages.
package co.mobiwise.firebasetraining.service;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import android.net.Uri;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
@muratcanbur
muratcanbur / Proguard config
Created November 8, 2016 12:28 — forked from PaNaVTEC/Proguard config
Proguard config
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/panavtec/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
@muratcanbur
muratcanbur / gradle.build
Created November 10, 2016 18:58
Gradle Config Fields
buildTypes {
debug {
buildConfigField “String”, “BASE_URL”, “\”http://api-qa.com/\""
}
release {
buildConfigField “String”, “BASE_URL”,“\”https://api.com/\""
}
}