Skip to content

Instantly share code, notes, and snippets.

View sabiou's full-sized avatar
📿
La hawla wa la quwwata illa Billah

Farouk Sabiou sabiou

📿
La hawla wa la quwwata illa Billah
View GitHub Profile
public class MediaPlayerService extends Service implements MediaPlayer.OnCompletionListener,
MediaPlayer.OnPreparedListener, MediaPlayer.OnErrorListener, MediaPlayer.OnSeekCompleteListener,
MediaPlayer.OnInfoListener, MediaPlayer.OnBufferingUpdateListener,
AudioManager.OnAudioFocusChangeListener {
public static final String ACTION_PLAY = "com.be.homsi.ACTION_PLAY";
public static final String ACTION_PAUSE = "com.be.homsi.ACTION_PAUSE";
public static final String ACTION_PREVIOUS = "com.be.homsi.ACTION_PREVIOUS";
public static final String ACTION_NEXT = "com.be.homsi.ACTION_NEXT";
@sabiou
sabiou / Inter.java
Last active April 4, 2019 09:58 — forked from tchiks1/Inter
public class Inter extends Fragment implements MainView {
List<InterpretationModel> passages;
List<InterpretationModel> interlists;
Menu test; AudioAdapter adapters;
public RecyclerView mRecyclerView,recycleraudio;
public Recycleradapter mAdapter;
boolean serviceBound = false;
TextView textView;
package com.be.homsi.adapter;
import android.Manifest;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
@sabiou
sabiou / IfElse.kt
Created March 5, 2019 02:58 — forked from ragdroid/IfElse.kt
Simplified if-else
infix fun <T>Boolean.then(action : () -> T): T? {
return if (this)
action.invoke()
else null
}
infix fun <T>T?.elze(action: () -> T): T {
return if (this == null)
action.invoke()
@sabiou
sabiou / Data.kt
Created February 1, 2019 23:38 — forked from florina-muntenescu/Data.kt
Using RoomDatabase#Callback to pre-populate the database - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@sabiou
sabiou / gist:9b4db3c17f493a404320584996e68455
Created February 1, 2019 22:01 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sabiou
sabiou / AsyncTaskActivity.java
Created January 23, 2019 01:42 — forked from cesarferreira/AsyncTaskActivity.java
Advanced Android AsyncTask Callback example
package com.cesarferreira.asynctaskcallback;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;
public class MainActivity extends Activity {
@Override
@sabiou
sabiou / RecyclerViewAdapter.java
Last active November 23, 2018 00:17
RecyclerViewAdapter template code
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
#parse("File Header.java")