diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fd45b12
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches/build_file_checksums.ser
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..7ac24c7
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..e0d5b93
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..eb9dfe0
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,42 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 28
+ defaultConfig {
+ applicationId "com.alpha.devster.backkk"
+ minSdkVersion 18
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ sourceSets {
+ main {
+ res.srcDirs =
+ [
+ 'src/main/res/layout',
+ 'src/main/res/menu',
+ 'src/main/res',
+
+ ]
+
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+
+ implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+ implementation 'com.android.support:design:28.0.0'
+ implementation 'org.greenrobot:eventbus:3.0.0'
+
+
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..23302b2
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses myWebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a084389
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/alpha/devster/backkk/BASE.java b/app/src/main/java/com/alpha/devster/backkk/BASE.java
new file mode 100644
index 0000000..4cfd96a
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/BASE.java
@@ -0,0 +1,131 @@
+package com.alpha.devster.backkk;
+
+
+import android.app.Notification;
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.os.Build;
+import android.provider.Settings;
+
+import com.alpha.devster.backkk.Services.BackkService;
+import com.alpha.devster.backkk.Services.GhostModeService1;
+import com.alpha.devster.backkk.Services.MediaPlayerServices;
+
+import static android.content.Context.CONNECTIVITY_SERVICE;
+
+public class BASE {
+
+
+ static boolean isPermission(Context context){
+ if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.M) {
+ if (Settings.canDrawOverlays(context))
+ return true;
+ else
+ return false;
+ }else
+ return true;
+ }
+
+ static boolean isServiceRunning() {
+ return BackkService.isServiceCreated();
+ }
+
+ public static boolean isNetworkAvailable(Context context) {
+ ConnectivityManager cm = (ConnectivityManager) context.getSystemService(CONNECTIVITY_SERVICE);
+ NetworkInfo netInfo = cm.getActiveNetworkInfo();
+ return (netInfo!=null && netInfo.isConnected());
+ }
+
+
+ public static class CONSTANTS{
+ // Request for Overlay over other apps
+ final static int OVERLAY_PERMISSION_REQ_BACKTO_ACT = 2345;
+ final static Class playerServiceClass=MediaPlayerServices.class;
+ final static String URL="https://www.youtube.com/";
+ public static final String CHANNELID="Backk";
+ //Type of player
+ //myWebView player = 0
+ static int playerType = 0;
+
+ //Repeat
+ //if repeatType = 0 --> no repeatType
+ //if repeatType = 1 --> repeatType complete
+ //if repeatType = 2 --> repeatType single
+ public static int repeatType = 0;
+ public static int noOfRepeats = 0;
+
+ //Finish service on end video
+ static boolean finishOnEnd = false;
+
+
+ //Actions
+ public interface ACTION {
+ String EXPAND_MODE = "com.alpha.devster.expandmode";
+ String PREV_ACTION = "com.alpha.devster.action.prev";
+ String PAUSE_PLAY_ACTION = "com.alpha.devster.action.play";
+ String NEXT_ACTION = "com.alpha.devster.action.next";
+ String STARTFOREGROUND_WEB_ACTION = "com.alpha.devster.playingweb";
+ String STOPFOREGROUND_WEB_ACTION = "com.alpha.devster.stopplayingweb";
+
+ }
+
+ //Notification Id
+ public interface NOTIFICATION_ID {
+ int FOREGROUND_SERVICE = 1;
+ }
+ public static Notification notification;
+
+ public static class STRINGS{
+ public static String VID_URL = "";
+ public static void setVid(String vid_url) { STRINGS.VID_URL = vid_url; }
+ public static String getVideoHTML() {
+ return "\n" +
+ "\n" +
+ " \n" +
+ " \n" +
+ " " +
+ "
\n" +
+ "\n" +
+ " \n" +
+ " \n" +
+ " \n" +
+ "\n" +
+ "\n" +
+ "";
+ }
+
+
+ }
+
+ }
+
+
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/Backk.java b/app/src/main/java/com/alpha/devster/backkk/Backk.java
new file mode 100644
index 0000000..1638dcf
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/Backk.java
@@ -0,0 +1,102 @@
+package com.alpha.devster.backkk;
+
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.v4.app.NotificationCompat;
+import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
+import android.widget.RemoteViews;
+
+import com.alpha.devster.backkk.Services.GhostModeService1;
+
+public class Backk extends AppCompatActivity {
+
+ private static final String TAG=Backk.class.getName();
+ public static final String CHANNELID="Backk";
+
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ SharedPreferences sharedPref=getApplicationContext().getSharedPreferences(getString(R.string.FileName), Context.MODE_PRIVATE);
+ Log.d(TAG,"***---------------------------------------------------------");
+ Log.d(TAG,"***backkk-> onCreate()");
+ createNotificationChannel();
+ SharedPreferences.Editor editor=sharedPref.edit();
+ if(!sharedPref.contains(getString(R.string.init))){
+ Log.d(TAG,"***backkk-> sharedPreference Initializing....");
+
+
+ //Setting sharedPreference as initialized
+ editor.putBoolean(getString(R.string.init),true);
+ editor.putBoolean(getString(R.string.firsttime),false);
+
+ //Repeat
+ //if repeatType = 0 --> no repeatType
+ //if repeatType = 1 --> repeatType complete
+ //if repeatType = 2 --> repeatType single
+ editor.putInt(getString(R.string.repeat_type), 0);
+ editor.putInt(getString(R.string.no_of_repeats), 5);
+
+ //Type of player
+ //myWebView player = 0
+ editor.putInt(getString(R.string.player_type), 0);
+
+ editor.apply();
+
+ }
+
+
+
+
+ if (BASE.isServiceRunning()) {
+ Log.d("***backkk : ", "Service & App Already Running! ExpandMode");
+ startActivity(new Intent(Backk.this,MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_SINGLE_TOP));
+ finish();
+ return;
+ }
+
+ if (BASE.isPermission(this)) {
+ Log.d(TAG,"***Permission Already granted, starting MainActivity");
+ finish();
+ startActivity(new Intent(this, MainActivity.class));
+
+ } else {
+ Log.d(TAG,"***Starting GetPermission Activity");
+ Intent i = new Intent(this,
+ GetPermission.class);
+ finish();
+ startActivity(i);
+
+ }
+
+ }
+
+
+ private void createNotificationChannel() {
+ if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){
+ NotificationChannel medialChannel=new NotificationChannel(CHANNELID
+ ,"Channel1"
+ ,NotificationManager.IMPORTANCE_DEFAULT);
+ medialChannel.setDescription("Backk");
+ NotificationManager manager=getSystemService(NotificationManager.class);
+ manager.createNotificationChannel(medialChannel);
+ }
+
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ Log.d(TAG,"***classbackk onDestroy()");
+
+ }
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/Callbacks/UpdateUI.java b/app/src/main/java/com/alpha/devster/backkk/Callbacks/UpdateUI.java
new file mode 100644
index 0000000..794e0c2
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/Callbacks/UpdateUI.java
@@ -0,0 +1,72 @@
+package com.alpha.devster.backkk.Callbacks;
+
+public class UpdateUI {
+
+ private static boolean exitApp = false;
+ private static boolean replay = false;
+ private static boolean pause = false;
+ private static boolean play = false;
+ private static boolean next = false;
+ private static boolean prev = false;
+
+ //-------------------------------------------------------------------------- Getters
+ public boolean isReplay() {
+ return replay;
+ }
+
+ public boolean isPause() {
+ return pause;
+ }
+
+ public boolean isPlay() {
+ return play;
+ }
+
+ public boolean isNext() {
+ return next;
+ }
+
+ public boolean isPrev() {
+ return prev;
+ }
+
+ public boolean isExit() {
+ return exitApp;
+ }
+
+ //-----------------------------------------------------------------------------Setters
+ public void ExitApp(boolean exit) {
+ UpdateUI.exitApp = exit;
+ }
+
+ public void replay(boolean replay) {
+ UpdateUI.replay = replay;
+ }
+
+ public void pause(boolean pause) {
+ UpdateUI.pause = pause;
+ }
+
+ public void play(boolean play) {
+ UpdateUI.play = play;
+ }
+
+ public void next(boolean next) {
+ UpdateUI.next = next;
+ }
+
+ public void prev(boolean prev) {
+ UpdateUI.prev = prev;
+ }
+
+
+ public void setDefault() {
+ exitApp = false;
+ replay = false;
+ pause = false;
+ play = false;
+ next = false;
+ prev = false;
+ }
+
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/GetPermission.java b/app/src/main/java/com/alpha/devster/backkk/GetPermission.java
new file mode 100644
index 0000000..ad71e3e
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/GetPermission.java
@@ -0,0 +1,97 @@
+package com.alpha.devster.backkk;
+
+import android.annotation.TargetApi;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.provider.Settings;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+
+public class GetPermission extends AppCompatActivity {
+
+ private static final String TAG=GetPermission.class.getName();
+ Button btn_getPermission;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_get_permission);
+ Log.d(TAG,"---------------------------------------------------------");
+ Log.d(TAG,"***GetPermission-> onCreate()");
+
+ btn_getPermission=findViewById(R.id.btn_get_permission);
+ btn_getPermission.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Log.d(TAG,"***GetPermission-> AskingPermission for code "+BASE.CONSTANTS.OVERLAY_PERMISSION_REQ_BACKTO_ACT);
+ askPermission();
+ }
+ });
+ }
+
+ private void askPermission() {
+ if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.M) {
+ Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
+ Uri.parse("package:" + getPackageName()));
+ startActivityForResult(intent, BASE.CONSTANTS.OVERLAY_PERMISSION_REQ_BACKTO_ACT);
+ }
+ }
+
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ Log.d(TAG,"***GetPermission-> onActivityResult() + resultCode "+requestCode);
+ if(requestCode==BASE.CONSTANTS.OVERLAY_PERMISSION_REQ_BACKTO_ACT && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ){
+ if(!Settings.canDrawOverlays(this)){
+ Log.d(TAG,"***GetPermission-> Not granted, show dialog");
+ needPermissionDialog(requestCode);
+ }
+ else{
+ Log.d(TAG,"***GetPermission-> Permission Granted()");
+ startActivity(new Intent(this, MainActivity.class));
+ finish();
+ }
+ }
+ }
+
+ @TargetApi(23)
+ private void needPermissionDialog(int resultCode) {
+
+ if(resultCode==BASE.CONSTANTS.OVERLAY_PERMISSION_REQ_BACKTO_ACT){
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setMessage("You need to grant the permission.");
+ builder.setPositiveButton("OK",
+ new android.content.DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ // TODO Auto-generated method stub
+ Intent i = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
+ Uri.parse("package:" + getPackageName()));
+ startActivityForResult(i, BASE.CONSTANTS.OVERLAY_PERMISSION_REQ_BACKTO_ACT);
+ }
+ });
+ builder.setNegativeButton("Cancel", new android.content.DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ // TODO Auto-generated method stub
+
+ }
+ });
+
+ builder.setCancelable(false);
+ builder.show();
+
+ }
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ Log.d(TAG,"***GetPermission-> onDestroy()");
+ }
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/JSController.java b/app/src/main/java/com/alpha/devster/backkk/JSController.java
new file mode 100644
index 0000000..fac357f
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/JSController.java
@@ -0,0 +1,72 @@
+package com.alpha.devster.backkk;
+
+/**
+ * Created by zain on 19/1/19.
+ */
+public class JSController {
+
+ public static String loadVideoScript(String vId){
+ return "javascript:player.loadVideoById(\"" + vId + "\");";
+ }
+
+ public static String playVideoScript() {
+ return "javascript:player.playVideo();";
+ }
+
+ public static String pauseVideoScript() {
+ return "javascript:player.pauseVideo();";
+ }
+
+ public static String onPlayerStateChangeListener() {
+ return "javascript:" +
+ "player.addEventListener(\"onStateChange\", \"onPlayerStateChange\");"+
+ "function onPlayerStateChange(event) {\n" +
+ " window.Interface.showPlayerState(player.getPlayerState());\n" +
+ " }";
+ }
+
+ public static String loadPlaylistScript(String pId) {
+ return "javascript:player.loadPlaylist({list:\"" + pId + "\"});";
+ }
+
+ public static String nextVideo() {
+ return "javascript:player.nextVideo()";
+ }
+
+ public static String prevVideo() {
+ return "javascript:player.previousVideo()";
+ }
+
+ public static String getVidUpdateNotiContent() {
+ return "javascript:window.Interface.showVID(player.getVideoData()['video_id']);";
+ }
+
+ public static String seekToZero() {
+ return "javascript:player.seekTo(0)";
+ }
+
+ public static String setLoopPlaylist() {
+ return "javascript:player.setLoop(true)";
+ }
+
+ public static String unsetLoopPlaylist() {
+ return "javascript:player.setLoop(false)";
+ }
+
+ public static String replayPlaylistScript() {
+ return "javascript:player.playVideoAt(0)";
+ }
+
+ public static String isPlaylistEnded() {
+ return "javascript:window.Interface.playlistItems(player.getPlaylist());" +
+ "window.Interface.currVidIndex(player.getPlaylistIndex());";
+ }
+
+ public static String resetPlaybackQuality(String quality) {
+ return "javascript:player.setPlaybackQuality(\"" + quality + "\");";
+ }
+
+ public static String getVideosInPlaylist() {
+ return "javascript:window.Interface.videosInPlaylist(player.getPlaylist());";
+ }
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/JavaScriptInterface.java b/app/src/main/java/com/alpha/devster/backkk/JavaScriptInterface.java
new file mode 100644
index 0000000..356f6ca
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/JavaScriptInterface.java
@@ -0,0 +1,50 @@
+package com.alpha.devster.backkk;
+
+import android.content.Context;
+import android.os.Handler;
+import android.util.Log;
+import android.webkit.JavascriptInterface;
+
+import com.alpha.devster.backkk.Services.BackkService;
+import com.alpha.devster.backkk.Services.GhostModeService1;
+
+/**
+ * Created by shyam on 18/2/16.
+ */
+class JavaScriptInterface {
+ private Context context;
+ private static Handler handlerForJavascriptInterface = new Handler();
+
+ public JavaScriptInterface(BackkService backkService) {
+ Log.d("***","Interface Set");
+ this.context = backkService;
+ }
+
+ @JavascriptInterface
+ public void showPlayerState (final int status) {
+ Log.d("Player Status ", String.valueOf(status));
+ handlerForJavascriptInterface.post(new Runnable() {
+ @Override
+ public void run() {
+ BackkService.setPlayingStatus(status);
+ }
+ });
+ }
+ @JavascriptInterface
+ public void showVID (final String vId) {
+ Log.d("New Video Id ", vId);
+ handlerForJavascriptInterface.post(new Runnable() {
+ @Override
+ public void run() {
+ BackkService.setTitleAuthuImage(vId);
+ }
+ });
+ }
+
+ @JavascriptInterface
+ public void currVidIndex (final int index) {
+ Log.d("Current Video Index ", String.valueOf(index));
+ BackkService.setCurrVideoIndex(index);
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/alpha/devster/backkk/MainActivity.java b/app/src/main/java/com/alpha/devster/backkk/MainActivity.java
new file mode 100644
index 0000000..f6dfa8f
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/MainActivity.java
@@ -0,0 +1,444 @@
+package com.alpha.devster.backkk;
+
+import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
+import android.app.Activity;
+
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.graphics.Bitmap;
+import android.graphics.PixelFormat;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.os.Handler;
+import android.os.RemoteException;
+import android.provider.Settings;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.design.widget.NavigationView;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewStub;
+import android.view.WindowManager;
+import android.webkit.WebResourceRequest;
+import android.webkit.WebResourceResponse;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+import android.widget.ImageButton;
+
+import android.widget.Toast;
+
+import com.alpha.devster.backkk.Callbacks.UpdateUI;
+import com.alpha.devster.backkk.Services.BackkService;
+
+import org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+
+import java.net.ConnectException;
+
+public class MainActivity extends AppCompatActivity implements View.OnClickListener, NavigationView.OnNavigationItemSelectedListener {
+
+ private static final String TAG = MainActivity.class.getName();
+ private Activity mainAct;
+
+ private String currUrl;
+ private boolean exit = false;
+
+ //-----------------------------------------------------------------------------------
+ private WebView myoutube;
+ private DrawerLayout mdrawerLayout;
+ private ActionBarDrawerToggle mdrawerToggle;
+
+ private SwipeRefreshLayout swipeRefreshLayout;
+
+ //------------------------------------------------------------------------------------
+ private int LAYOUT_FLAG;
+ private static WindowManager windowManager;
+ private DrawerLayout windowMain;
+ private static WindowManager.LayoutParams expandParams, ghostParams;
+ private static boolean ghostMode = false;
+ //--------------------------------------------------------------------------------Lvl 1 Creation
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ Log.d(TAG, "***ClassMain---------------------------------------------------------");
+ Log.d(TAG, "***-> onCreate");
+ EventBus.getDefault().register(this);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ LAYOUT_FLAG = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+ } else {
+ LAYOUT_FLAG = WindowManager.LayoutParams.TYPE_PHONE;
+ }
+
+ mainAct = this;
+ currUrl = BASE.CONSTANTS.URL;
+ initializeViewgroup();
+ windowManager.addView(windowMain, expandParams);
+ if (myoutube != null) {
+ myoutube.loadUrl(currUrl);
+ myoutube.addJavascriptInterface(new JavaScriptInterface(new BackkService()), "Interface");
+
+ }
+
+
+ }
+
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ Log.d(TAG, "***-> onResume()");
+ expandMode();
+ this.moveTaskToBack(true);
+ }
+
+ @Override
+ protected void onStop() {
+ Log.d(TAG, "***-> onStop()");
+ super.onStop();
+ }
+
+ //---------------------------------------------------------------------------------Lvl2 Features
+ private void expandMode() {
+ if (ghostMode && BASE.isServiceRunning())
+ windowManager.updateViewLayout(windowMain, expandParams);
+ ghostMode = false;
+ }
+
+ private void startGhostMode() {
+ ghostMode = true;
+ windowManager.updateViewLayout(windowMain, ghostParams);
+
+ }
+
+
+ //------------------------------------------------------------------------------Lvl3 ClickEvents
+ @Override
+ public void onClick(View v) {
+
+ switch (v.getId()) {
+ case R.id.btn_ghostmode:
+ Toast.makeText(MainActivity.this, "Ghost Mode", Toast.LENGTH_SHORT).show();
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+ startGhostMode();
+
+ } else if (Settings.canDrawOverlays(this)) {
+ startGhostMode();
+
+ } else {
+
+ Toast.makeText(this, "You need System Alert Window Permission to do this", Toast.LENGTH_SHORT).show();
+ }
+
+ break;
+ case R.id.btn_exit:
+ myoutube.loadUrl(myoutube.getUrl());
+ //exitApp();
+ break;
+ case R.id.btn:
+ if (mdrawerLayout.isDrawerOpen(Gravity.START)) {
+ mdrawerLayout.closeDrawer(Gravity.START);
+ }else
+ mdrawerLayout.openDrawer(Gravity.START);
+ break;
+
+ case R.id.btn_Retry:
+ mainAct.recreate();
+
+ }
+ }
+
+ @Override
+ public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
+ int id = menuItem.getItemId();
+ switch (id) {
+ case R.id.navigation_item_1:
+ startActivity(new Intent(MainActivity.this, MainActivity.class));
+ break;
+ case R.id.navigation_item_2:
+ startActivity(new Intent(MainActivity.this, MainActivity.class));
+ break;
+ }
+ return false;
+ }
+
+ @Override
+ public void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ if (mdrawerToggle != null)
+ mdrawerToggle.syncState();
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ if (mdrawerToggle != null)
+ mdrawerToggle.onConfigurationChanged(newConfig);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (mdrawerToggle != null) {
+ if (mdrawerToggle.onOptionsItemSelected(item))
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+ @SuppressWarnings("unused")
+ @Subscribe
+ public void onEvent(UpdateUI state) {
+ if (state.isExit()) {
+ exitApp();
+ state.setDefault();
+ return;
+ }
+ if (state.isPause()) {
+ Log.d(TAG, "***Pause Video");
+ myoutube.loadUrl(JSController.pauseVideoScript());
+ }
+
+
+ }
+
+ @Override
+ protected void onNewIntent(Intent intent) {
+ super.onNewIntent(intent);
+ if(intent.getAction()!=null){
+ if(intent.getAction().equals(BASE.CONSTANTS.ACTION.EXPAND_MODE))
+ Log.d(TAG, "***-> ExpandMode on From notification");
+ }
+ }
+
+ private void addStateChangeListener() {
+ myoutube.loadUrl(JSController.onPlayerStateChangeListener());
+ }
+
+ //------------------------------------------------------------------------------------Lvl4 Inits
+
+ private void initParams() {
+ expandParams = new WindowManager.LayoutParams(
+ WindowManager.LayoutParams.MATCH_PARENT,
+ WindowManager.LayoutParams.MATCH_PARENT,
+ LAYOUT_FLAG,
+ WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON,
+ PixelFormat.TRANSLUCENT);
+ expandParams.gravity = Gravity.START | Gravity.TOP;
+ expandParams.x = 0;
+ expandParams.y = 0;
+
+ ghostParams = new WindowManager.LayoutParams(
+ 0,
+ 0,
+ LAYOUT_FLAG,
+ WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON |
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+ PixelFormat.TRANSPARENT);
+ ghostParams.gravity = Gravity.START | Gravity.TOP;
+ ghostParams.x = 0;
+ ghostParams.y = 0;
+
+ }
+ private void initializeViewgroup() {
+ //Initializing Windows Params
+ initParams();
+ //Window
+ windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
+ LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
+ DrawerLayout wrapper=new DrawerLayout(this){
+ @Override
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if(event.getKeyCode()==KeyEvent.KEYCODE_BACK){
+ if(event.getAction()==KeyEvent.ACTION_DOWN){
+ Log.d(TAG, "***expandMode-> onBackPressed ");
+ if(exit)
+ exitApp();
+ else{
+ if (mdrawerLayout.isDrawerOpen(Gravity.START))
+ mdrawerLayout.closeDrawer(Gravity.START);
+ else if (!ghostMode && myoutube != null) {
+ if (myoutube.canGoBack()) {
+ Log.d(TAG, "***webview-> going back");
+ myoutube.goBack();
+ }
+ }
+
+ }
+ }
+ return true;
+ }
+ return super.dispatchKeyEvent(event); }
+ };
+ windowMain = (DrawerLayout) inflater.inflate(R.layout.activity_main, wrapper);
+
+ initializeView();
+ }
+ private void initializeView() {
+
+ ImageButton btn_ghost,btn_exit, btn_menuu;
+
+ //-------------------------------------------------------------------------------------
+ ViewStub viewStub = windowMain.findViewById(R.id.view_stub);
+ viewStub.setLayoutResource(R.layout.content_main_webview);
+ viewStub.inflate();
+ //------------------------------------------------------------------Views
+ myoutube = windowMain.findViewById(R.id.wv_youtube);
+ btn_ghost = windowMain.findViewById(R.id.btn_ghostmode);
+ btn_exit=windowMain.findViewById(R.id.btn_exit);
+ btn_menuu = windowMain.findViewById(R.id.btn);
+
+ //-------------------------------------------------------------NavigationTab
+ NavigationView mnavigation = windowMain.findViewById(R.id.navigation_view);
+ mdrawerLayout = windowMain.findViewById(R.id.drawer);
+ mdrawerToggle = new ActionBarDrawerToggle(MainActivity.this, mdrawerLayout, R.string.app_name, R.string.app_name);
+
+
+ btn_ghost.setOnClickListener(this);
+ btn_exit.setOnClickListener(this);
+ btn_menuu.setOnClickListener(this);
+ mdrawerLayout.addDrawerListener(mdrawerToggle);
+ mnavigation.setNavigationItemSelectedListener(this);
+
+ //----------------------------------------------------------------Settings
+
+ settingWebview();
+ //Swipe Refresh myWebView
+ swipeRefreshLayout = windowMain.findViewById(R.id.swipe_refresh);
+ swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
+ @Override
+ public void onRefresh() {
+// myoutube.post(new Runnable() {
+// @Override
+// public void run() {
+// myoutube.loadUrl(myoutube.getUrl());
+// }
+// });
+ new Handler().post(new Runnable() {
+ @Override
+ public void run() {
+
+ myoutube.loadUrl(myoutube.getUrl());
+
+ }
+ });
+ }
+
+
+ });
+
+ // after initialization
+ swipeRefreshLayout.setOnChildScrollUpCallback(new SwipeRefreshLayout.OnChildScrollUpCallback() {
+ @Override
+ public boolean canChildScrollUp(@NonNull SwipeRefreshLayout swipeRefreshLayout, @Nullable View view) {
+ return myoutube.getScrollY() > 0;
+ }
+ });
+
+
+ if (!BASE.isServiceRunning()) {
+ final Intent intent = new Intent(MainActivity.this, BackkService.class);
+ intent.setAction(BASE.CONSTANTS.ACTION.STARTFOREGROUND_WEB_ACTION);
+ startService(intent);
+ }
+
+ }
+
+ @SuppressLint("SetJavaScriptEnabled")
+ private void settingWebview() {
+
+ myoutube.getSettings().setLoadsImagesAutomatically(true);
+ myoutube.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
+ myoutube.getSettings().setBuiltInZoomControls(false);
+ myoutube.getSettings().setLoadsImagesAutomatically(true);
+ myoutube.getSettings().setMediaPlaybackRequiresUserGesture(true);
+ myoutube.getSettings().setJavaScriptEnabled(true);
+ myoutube.setWebViewClient(new Myyoutube());
+ }
+
+ //--------------------------------------------------------------------------------Lvl5 Destroy
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ Log.d(TAG, "*** onDestroy()");
+ ghostMode = false;
+ }
+
+ private void exitApp() {
+ Log.d(TAG, "*** Exit from App.");
+ windowManager.removeView(windowMain);
+ if(BASE.isServiceRunning())
+ stopService(new Intent(MainActivity.this,BackkService.class));
+ finish();
+ }
+
+ //---------------------------------------------------------------------------Lvl6 Infernal Hell
+ private class Myyoutube extends WebViewClient {
+
+ @Override
+ public void onPageStarted(WebView view, String url, Bitmap favicon) {
+ super.onPageStarted(view, url, favicon);
+ Log.d(TAG, "***classmain-> webview refreshing "+url);
+
+ swipeRefreshLayout.setRefreshing(true);
+ exit=false;
+ currUrl = url;
+
+
+ }
+
+ @Override
+ public void onPageFinished(WebView view, String url) {
+ super.onPageFinished(view, url);
+ Log.d(TAG, "***classmain-> webview is refreshed "+url);
+ swipeRefreshLayout.setRefreshing(false);
+ currUrl = url;
+ addStateChangeListener();
+
+ }
+
+
+ @Override
+ public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
+ {
+ Log.d(TAG,"*** ErrorLoading "+description+" ErrorCode "+errorCode);
+ swipeRefreshLayout.setRefreshing(false);
+ exit=true;
+ }
+ @Override
+ public boolean shouldOverrideUrlLoading(WebView view, String url) {
+ return false;
+ }
+
+ @TargetApi(21)
+ @Override
+ public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
+
+ if (String.valueOf(request.getUrl()).contains("http://m.youtube.com/watch?") ||
+ String.valueOf(request.getUrl()).contains("https://m.youtube.com/watch?")) {
+ currUrl = String.valueOf(request.getUrl());
+
+ //Video Id
+ String VID_ID = currUrl.substring(currUrl.indexOf("?v=") + 3, currUrl.indexOf('&'));
+ Log.d(TAG, "***classmain-> URL is " + currUrl);
+ Log.d(TAG, "***classmain-> VID is " + VID_ID);
+
+ }
+ return super.shouldInterceptRequest(view, request);
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/Services/BackkService.java b/app/src/main/java/com/alpha/devster/backkk/Services/BackkService.java
new file mode 100644
index 0000000..8966046
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/Services/BackkService.java
@@ -0,0 +1,282 @@
+package com.alpha.devster.backkk.Services;
+
+import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.graphics.Bitmap;
+import android.graphics.PixelFormat;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.provider.Settings;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.design.widget.NavigationView;
+import android.support.v4.app.NotificationCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewStub;
+import android.view.WindowManager;
+import android.webkit.WebResourceRequest;
+import android.webkit.WebResourceResponse;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+import android.widget.Button;
+import android.widget.ImageButton;
+import android.widget.RemoteViews;
+import android.widget.Toast;
+
+import com.alpha.devster.backkk.BASE;
+import com.alpha.devster.backkk.Callbacks.UpdateUI;
+import com.alpha.devster.backkk.JSController;
+import com.alpha.devster.backkk.MainActivity;
+import com.alpha.devster.backkk.R;
+
+import org.greenrobot.eventbus.EventBus;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.net.MalformedURLException;
+import java.util.concurrent.ExecutionException;
+
+public class BackkService extends Service {
+ private static final String TAG = BackkService.class.getName();
+ private static BackkService mInstance = null;
+ //---------------------------------------------------------------------------------------
+ private static String currUrl = "";
+ private static int currVideoIndex;
+ private static String VID_ID = "";
+ private static String VID_TITLE = "";
+ private static String VID_AUTHUR = "";
+ private static NotificationManager notificationManager;
+ private static Notification notification;
+ private static RemoteViews notifbar;
+ //-----------------------------------------------------------------------------------------
+ private static boolean nextVid = false;
+ private static boolean isVideoPlaying = true;
+ //Replay Video if it's ended
+ private static boolean replayVid = false;
+
+
+ public BackkService() { }
+
+ public static boolean isServiceCreated() {
+ return mInstance != null;
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ Log.d(TAG, "*** Service Is created");
+
+ }
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ if (mInstance == null)
+ mInstance = this;
+ else
+ Log.d(TAG, "*** Service Is Already Running");
+
+ final String action = intent.getAction();
+ if (action != null) {
+ UpdateUI ui = new UpdateUI();
+ switch (action) {
+ case BASE.CONSTANTS.ACTION.STARTFOREGROUND_WEB_ACTION:
+ Log.d(TAG, "*** Action to start the service");
+ startNotification();
+ break;
+ case BASE.CONSTANTS.ACTION.STOPFOREGROUND_WEB_ACTION:
+ Log.d(TAG, "*** Action to stop the service");
+ mInstance = null;
+ stopForeground(true);
+ stopSelf();
+ stopService(new Intent(this, BackkService.class));
+ ui.ExitApp(true);
+ EventBus.getDefault().post(ui);
+ break;
+
+ case BASE.CONSTANTS.ACTION.PAUSE_PLAY_ACTION:
+ Log.d(TAG, "*** Action for pause/play/replay action");
+ if (isVideoPlaying) {
+ if (replayVid) {
+ Log.d(TAG, "*** Replay Video");
+ replayVid = false;
+ ui.replay(true);
+ EventBus.getDefault().post(ui);
+
+ } else {
+
+ ui.pause(true);
+ EventBus.getDefault().post(ui);
+
+ }
+ } else {
+ Log.d(TAG, "***Play Video");
+ ui.play(true);
+ EventBus.getDefault().post(ui);
+
+ }
+ break;
+
+
+ }
+ }
+
+
+ return START_NOT_STICKY;
+ }
+
+ @TargetApi(28)
+ private void startNotification() {
+ notifbar = new RemoteViews(
+ this.getPackageName(),
+ R.layout.layout_notification);
+ notification = new NotificationCompat.Builder(this, BASE.CONSTANTS.CHANNELID)
+ .setSmallIcon(R.mipmap.logo_app1)
+ .setCustomContentView(notifbar)
+ .setCustomBigContentView(notifbar)
+ .setBadgeIconType(R.mipmap.logo_app1)
+ .setPriority(Notification.PRIORITY_MAX)
+ .setPriority(Notification.PRIORITY_HIGH)
+ .setAutoCancel(false)
+ .build();
+
+ notification.flags |= Notification.FLAG_ONGOING_EVENT;
+ BASE.CONSTANTS.notification = notification;
+
+
+ //Intent to do things
+ Intent doThings = new Intent(this, BackkService.class);
+
+ //stop Service using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.stop_ghostmode,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.STOPFOREGROUND_WEB_ACTION), 0));
+
+ //Pause, Play Video using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.pause_play_video,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.PAUSE_PLAY_ACTION), 0));
+
+ //Next Video using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.next_video,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.NEXT_ACTION), 0));
+
+ //Previous Video using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.previous_video,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.PREV_ACTION), 0));
+
+ //Expand Mode using doThings Intent
+ Intent intent = new Intent(this, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+ notifbar.setOnClickPendingIntent(R.id.expand_mode,
+ PendingIntent.getActivity(getApplicationContext(), 0,
+ intent.setAction(BASE.CONSTANTS.ACTION.EXPAND_MODE), PendingIntent.FLAG_UPDATE_CURRENT));
+
+ notificationManager =
+ (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
+ notificationManager.notify(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE, notification);
+
+ startForeground(1, notification);
+ }
+
+ public static void setTitleAuthuImage(String vId) {
+ try {
+
+ String details = new LoadDetailsTask(
+ "https://youtube.com/get_video_info?video_id=" + VID_ID + "&format=json")
+ .execute().get();
+ JSONObject detailsJson = new JSONObject(details);
+ VID_TITLE = detailsJson.getString("title");
+ VID_AUTHUR = detailsJson.getString("authur");
+ Log.d(TAG, "***Video Title " + VID_TITLE + " " + "VID Authur +" + VID_AUTHUR);
+ notifbar.setTextViewText(R.id.title, VID_TITLE);
+ notifbar.setTextViewText(R.id.authur, VID_AUTHUR);
+ notificationManager.notify(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE, notification);
+
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public static void setCurrVideoIndex(int currVideIndex) {
+ BackkService.currVideoIndex = currVideIndex;
+ }
+
+ public static void setPlayingStatus(int playingStatus) {
+ if (playingStatus == -1) {
+ nextVid = true;
+ }
+ if (playingStatus == 1) {
+ isVideoPlaying = true;
+ notifbar.setImageViewResource(R.id.pause_play_video, R.mipmap.icon_pause);
+ notificationManager.notify(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE, notification);
+ if (nextVid) {
+ nextVid = false;
+ //loadScript(JavaScript.getVidUpdateNotiContent());
+ }
+
+
+ } else if (playingStatus == 2) {
+ isVideoPlaying = false;
+ notifbar.setImageViewResource(R.id.pause_play_video, R.mipmap.icon_play);
+
+ notificationManager.notify(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE, notification);
+ } else if (playingStatus == 0) {
+ Log.d(TAG, "*** Repeat type" + BASE.CONSTANTS.repeatType + "");
+
+ //webPlayer.loadScript(JavaScript.prevVideo());
+
+ replayVid = true;
+ //notifbar.setImageViewResource(R.id.pause_play_video, R.drawable.ic_replay);
+
+ notificationManager.notify(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE, notification);
+
+ }
+
+
+ }
+
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ Log.d(TAG, "***Service is destroyed.");
+ isVideoPlaying=true;
+ mInstance = null;
+ stopForeground(true);
+ stopSelf();
+ stopService(new Intent(this, BackkService.class));
+ }
+
+
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/Services/GhostModeService1.java b/app/src/main/java/com/alpha/devster/backkk/Services/GhostModeService1.java
new file mode 100644
index 0000000..9a7cace
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/Services/GhostModeService1.java
@@ -0,0 +1,328 @@
+package com.alpha.devster.backkk.Services;
+
+import android.annotation.TargetApi;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.PixelFormat;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.support.v4.app.NotificationCompat;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RemoteViews;
+
+import com.alpha.devster.backkk.BASE;
+import com.alpha.devster.backkk.JSController;
+import com.alpha.devster.backkk.MainActivity;
+import com.alpha.devster.backkk.R;
+import com.alpha.devster.backkk.myWebView;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.net.MalformedURLException;
+import java.util.concurrent.ExecutionException;
+
+import static com.alpha.devster.backkk.Backk.CHANNELID;
+
+public class GhostModeService1 extends Service implements View.OnClickListener {
+
+ private static final String TAG=GhostModeService1.class.getName();
+ private static int noItemsInPlaylist, currVideoIndex;
+ private static GhostModeService1 mInstance=null;
+
+ //----------------------------------------------------------------------------------
+ private static WindowManager windowManager;
+ private static WindowManager.LayoutParams headParams;
+ private LinearLayout ghostHead,ghostViewlayout;
+ private FrameLayout ghostPlayerFrame;
+ private ImageView ghostheadImage;
+ //----------------------------------------------------------------------------------
+
+ private static String VID_URL="";
+ private static String VID_ID="";
+ private static String VID_TITLE="";
+ private static NotificationManager notificationManager;
+ private static Notification notification;
+ private static RemoteViews notifbar;
+ private int LAYOUT_FLAG;
+ //-----------------------------------------------------------------------------------
+ private static myWebView myoutubewv;
+ private static boolean nextVid = false;
+ private static boolean isVideoPlaying = true;
+ //Replay Video if it's ended
+ private static boolean replayVid = false;
+
+
+ public GhostModeService1(){ }
+ public static boolean isServiceCreated(){
+ return mInstance!=null;
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+
+ @Override
+ public boolean onUnbind(Intent intent) {
+ return super.onUnbind(intent);
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ Log.d(TAG,"***ghostservice-> onCreate()");
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ LAYOUT_FLAG = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
+ } else {
+ LAYOUT_FLAG = WindowManager.LayoutParams.TYPE_PHONE;
+ }
+ }
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+
+ Log.d(TAG,"***ghostservice-> onStartCommand()");
+ if(mInstance==null)
+ mInstance=this;
+ if(intent.getAction()!=null){
+ if (intent.getAction().equals(BASE.CONSTANTS.ACTION.STARTFOREGROUND_WEB_ACTION)){
+ ghostModeOn(intent);
+ }
+ else if(intent.getAction().equals(BASE.CONSTANTS.ACTION.STOPFOREGROUND_WEB_ACTION)){
+ Log.i(TAG, "***classghost -> trying to stop service");
+ stopForeground(true);
+ stopSelf();
+ stopService(new Intent(this, GhostModeService1.class));
+ } else if(intent.getAction().equals(BASE.CONSTANTS.ACTION.PAUSE_PLAY_ACTION)){
+ if (isVideoPlaying) {
+ if (replayVid) {
+ Log.i(TAG, "*** Replay Video");
+ myoutubewv.loadScript(JSController.playVideoScript());
+ replayVid = false;
+
+ } else {
+ Log.i(TAG , "***Pause Video");
+ myoutubewv.loadScript(JSController.pauseVideoScript());
+ }
+ } else {
+ Log.i(TAG, "***Play Video");
+ myoutubewv.loadScript(JSController.playVideoScript());
+ }
+ }
+ else if(intent.getAction().equals(BASE.CONSTANTS.ACTION.NEXT_ACTION)){
+ Log.d(TAG, "***Tryinh to Play Next");
+ myoutubewv.loadScript(JSController.nextVideo());
+ nextVid = true;
+
+ }
+ else if(intent.getAction().equals(BASE.CONSTANTS.ACTION.PREV_ACTION)){
+ Log.d(TAG, "***Trying to Play Previous");
+ myoutubewv.loadScript(JSController.prevVideo());
+ nextVid = true;
+
+ }
+
+ }
+
+ return START_NOT_STICKY;
+ }
+
+ private void ghostModeOn(Intent intent) {
+ Bundle b=intent.getExtras();
+ if(b!=null){
+ Log.d(TAG,"***classghost "+" bundle not null");
+ GhostModeService1.VID_URL=b.getString("VID_URL");
+ GhostModeService1.VID_ID=b.getString("VID_ID");
+ }
+ else
+ Log.d(TAG,"***classghost "+" bundle null");
+ foregroundNotification();
+
+ //startForeground(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE,BASE.CONSTANTS.notification);
+
+ //View
+ windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
+ //Initializing Windows Params
+ initParams();
+ LayoutInflater inflater = (LayoutInflater) this.getSystemService
+ (Context.LAYOUT_INFLATER_SERVICE);
+
+ ghostHead =(LinearLayout) inflater.inflate(R.layout.ghost_head,null);
+ ghostheadImage=(ImageView) ghostHead.findViewById(R.id.img_ghost_head);
+ headParams.gravity = Gravity.BOTTOM | Gravity.END;
+ headParams.x = 0;
+ headParams.y = 0;
+ windowManager.addView(ghostHead, headParams);
+
+ //Player View
+ ghostViewlayout = (LinearLayout) inflater.inflate(R.layout.layout_ghostmode, null, false);
+ ghostPlayerFrame = (FrameLayout) ghostViewlayout.findViewById(R.id.ghost_player_frame);
+
+ myoutubewv=new myWebView(this);
+ BASE.CONSTANTS.STRINGS.VID_URL=GhostModeService1.VID_ID;
+
+
+ ghostPlayerFrame.addView(myoutubewv);
+ myoutubewv.loadScript(VID_URL);
+
+ //handeling GhostHeadImage Click
+ ghostheadImage.setOnClickListener(this);
+
+ }
+
+
+ public static void startNoti(){
+ }
+
+ @TargetApi(28)
+ protected void foregroundNotification() {
+ notifbar = new RemoteViews(
+ this.getPackageName(),
+ R.layout.layout_notification);
+ notification = new NotificationCompat.Builder(this,CHANNELID)
+ .setSmallIcon(R.mipmap.logo_app1)
+ .setContentIntent(notificationIntent())
+ .setCustomContentView(notifbar)
+ .setCustomBigContentView(notifbar)
+ .setBadgeIconType(R.mipmap.logo_app1)
+ .setPriority(Notification.PRIORITY_MAX)
+ .setPriority(Notification.PRIORITY_HIGH)
+ .setDefaults(Notification.DEFAULT_ALL)
+ .setAutoCancel(false)
+ .build();
+
+ notification.flags |= Notification.FLAG_ONGOING_EVENT;
+
+ setTitle(VID_ID);
+
+ //Intent to do things
+ Intent doThings = new Intent(this, GhostModeService1.class);
+
+ //stop Service using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.stop_ghostmode,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.STOPFOREGROUND_WEB_ACTION), 0));
+
+ //Pause, Play Video using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.pause_play_video,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.PAUSE_PLAY_ACTION) , 0));
+
+ //Next Video using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.next_video,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.NEXT_ACTION) , 0));
+
+ //Previous Video using doThings Intent
+ notifbar.setOnClickPendingIntent(R.id.previous_video,
+ PendingIntent.getService(getApplicationContext(), 0,
+ doThings.setAction(BASE.CONSTANTS.ACTION.PREV_ACTION), 0));
+
+ notificationManager =
+ (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
+ notificationManager.notify(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE,notification);
+ startForeground(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE,notification);
+ }
+ private PendingIntent notificationIntent() {
+ Intent intent = new Intent(this, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+
+ return PendingIntent.getActivity(this, 0, intent,
+ PendingIntent.FLAG_UPDATE_CURRENT);
+
+ }
+ private void initParams() {
+ //Service Head Params
+ headParams = new WindowManager.LayoutParams(
+ WindowManager.LayoutParams.WRAP_CONTENT,
+ WindowManager.LayoutParams.WRAP_CONTENT,
+ LAYOUT_FLAG,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
+ PixelFormat.TRANSLUCENT
+ );
+ }
+
+ public static void startVID(String vurl,String vId) {
+ Log.d(TAG,"***classghost -> Already service running, Starting Video");
+ GhostModeService1.VID_URL = vurl;
+ GhostModeService1.VID_ID=vId;
+ if(vurl != null && vId!=null) {
+ setTitle(vId);
+ myoutubewv.loadUrl(vurl);
+ }
+ }
+
+ public static void setTitle(String vId) {
+ try {
+
+ String details = new LoadDetailsTask(
+ "https://youtube.com/get_video_info?video_id=" + VID_ID + "&format=json")
+ .execute().get();
+ JSONObject detailsJson = new JSONObject(details);
+ VID_TITLE = detailsJson.getString("title");
+ Log.d(TAG,"***classghost-> Video Title "+VID_TITLE);
+ notifbar.setTextViewText(R.id.title, VID_TITLE);
+ notificationManager.notify(BASE.CONSTANTS.NOTIFICATION_ID.FOREGROUND_SERVICE, notification);
+
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public static void addStateChangeListener() {
+ myoutubewv.loadScript(JSController.onPlayerStateChangeListener());
+ }
+ public static void setCurrVideoIndex(int currVideoIndex) {
+ GhostModeService1.currVideoIndex = currVideoIndex;
+ }
+ //Update Image of Repeat Type Button
+// private void updateRepeatTypeImage() {
+// if(BASE.CONSTANTS.repeatType == 0){
+// repeatTypeImg.setImageDrawable(getResources().getDrawable(R.drawable.ic_repeat_none));
+// }
+// else if(BASE.CONSTANTS.repeatType == 1){
+// repeatTypeImg.setImageDrawable(getResources().getDrawable(R.drawable.ic_repeat));
+// }
+// else if(BASE.CONSTANTS.repeatType == 2){
+// repeatTypeImg.setImageDrawable(getResources().getDrawable(R.drawable.ic_repeat_one));
+// }
+// }
+
+
+ @Override
+ public void onClick(View v) {
+ switch (v.getId()) {
+ case R.id.img_ghost_head:
+
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ Log.d(TAG,"***ghostservice-> onDestroy()");
+ mInstance=null;
+ stopSelf();
+ }
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/Services/LoadDetailsTask.java b/app/src/main/java/com/alpha/devster/backkk/Services/LoadDetailsTask.java
new file mode 100644
index 0000000..6da1c32
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/Services/LoadDetailsTask.java
@@ -0,0 +1,57 @@
+package com.alpha.devster.backkk.Services;
+
+import android.os.AsyncTask;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Created by shyam on 23/2/16.
+ */
+public class LoadDetailsTask extends AsyncTask {
+
+ private HttpURLConnection urlConnection;
+ private URL url;
+
+ LoadDetailsTask(String url) throws MalformedURLException {
+ this.url = new URL(url);
+ }
+
+ @Override
+ protected String doInBackground(String... args) {
+
+ StringBuilder result = new StringBuilder();
+
+ try {
+ urlConnection = (HttpURLConnection) url.openConnection();
+ InputStream in = new BufferedInputStream(urlConnection.getInputStream());
+
+ BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+
+ String line;
+ while ((line = reader.readLine()) != null) {
+ result.append(line);
+ }
+
+ }catch( Exception e) {
+ e.printStackTrace();
+ }
+ finally {
+ urlConnection.disconnect();
+ }
+
+
+ return result.toString();
+ }
+
+ @Override
+ protected void onPostExecute(String result) {
+ super.onPostExecute(result);
+
+ }
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/Services/MediaPlayerServices.java b/app/src/main/java/com/alpha/devster/backkk/Services/MediaPlayerServices.java
new file mode 100644
index 0000000..fd371f3
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/Services/MediaPlayerServices.java
@@ -0,0 +1,53 @@
+package com.alpha.devster.backkk.Services;
+
+import android.app.Service;
+import android.content.Intent;
+import android.media.MediaPlayer;
+import android.media.session.MediaController;
+import android.media.session.MediaSession;
+import android.media.session.MediaSessionManager;
+import android.os.IBinder;
+
+public class MediaPlayerServices extends Service {
+
+ private static MediaPlayerServices mInstance=null;
+ private MediaSession mSession;
+
+ private static final String ACTION_PLAY="action_play";
+ private static final String ACTION_PAUSE="action_pause";
+ private static final String ACTION_NEXT="action_next";
+ private static final String ACTION_PREV="action_prev";
+ private static final String ACTION_EXIT="action_exit";
+
+ private MediaSessionManager mManager;
+ private MediaPlayer mPlayer;
+ private MediaController mController;
+
+
+ public static boolean isServiceCreated(){
+ return mInstance!=null;
+ }
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+
+ @Override
+ public boolean onUnbind(Intent intent) {
+ //mSession.release();
+ return super.onUnbind(intent);
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ mInstance=this;
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ mInstance=null;
+ stopSelf();
+ }
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/SplashActivity.java b/app/src/main/java/com/alpha/devster/backkk/SplashActivity.java
new file mode 100644
index 0000000..9a86566
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/SplashActivity.java
@@ -0,0 +1,13 @@
+package com.alpha.devster.backkk;
+
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+
+public class SplashActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_splash);
+ }
+}
diff --git a/app/src/main/java/com/alpha/devster/backkk/myWebView.java b/app/src/main/java/com/alpha/devster/backkk/myWebView.java
new file mode 100644
index 0000000..9a0df67
--- /dev/null
+++ b/app/src/main/java/com/alpha/devster/backkk/myWebView.java
@@ -0,0 +1,73 @@
+package com.alpha.devster.backkk;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.webkit.WebChromeClient;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+
+import com.alpha.devster.backkk.Services.BackkService;
+import com.alpha.devster.backkk.Services.GhostModeService1;
+
+/**
+ * Created by shyam on 15/3/16.
+ */
+public class myWebView extends WebView{
+
+ private Context context;
+
+ public myWebView(Context ctxt) {
+ super(ctxt);
+ context = ctxt;
+ initView();
+ }
+
+ public myWebView(Context ctxt, AttributeSet attrs){
+ super(ctxt,attrs);
+ }
+
+ @SuppressLint("SetJavaScriptEnabled")
+ public void initView() {
+
+ this.getSettings().setJavaScriptEnabled(true);
+ this.setWebChromeClient(new WebChromeClient());
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
+ this.getSettings().setMediaPlaybackRequiresUserGesture(false);
+ }
+ //myoutube.getSettings().setUserAgentString("Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:21.0.0) Gecko/20121011 Firefox/21.0.0");
+
+ //----------------------------To get Player Id-------------------------------------------
+
+ this.addJavascriptInterface(new JavaScriptInterface((BackkService) context), "Interface");
+ this.setWebViewClient(new WebViewClient() {
+ @Override
+ public boolean shouldOverrideUrlLoading(android.webkit.WebView view, String url) {
+ Log.d("***Ghost Webview","URl LOad");
+ return false;
+ }
+
+ @Override
+ public void onPageFinished(android.webkit.WebView view, String url) {
+ Log.d("***Ghost Webview","URl LOad finished");
+ GhostModeService1.addStateChangeListener();
+ }
+ }
+ );
+ }
+
+ public void loadScript(String s) {
+ this.loadUrl(s);
+ }
+
+
+ public void destroyWV() {
+ this.destroy();
+ }
+
+ public void loadDataWithUrl(String baseUrl, String videoHTML, String mimeType, String encoding, String historyUrl) {
+ this.loadDataWithBaseURL(baseUrl, videoHTML, mimeType, encoding, historyUrl);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..1f6bb29
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..0d025f9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/notification_bar_gradient.xml b/app/src/main/res/drawable/notification_bar_gradient.xml
new file mode 100644
index 0000000..34db6c7
--- /dev/null
+++ b/app/src/main/res/drawable/notification_bar_gradient.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..4ddaf89
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml
new file mode 100644
index 0000000..66de2f3
--- /dev/null
+++ b/app/src/main/res/layout/activity_splash.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/ghost_head.xml b/app/src/main/res/layout/ghost_head.xml
new file mode 100644
index 0000000..db79b9a
--- /dev/null
+++ b/app/src/main/res/layout/ghost_head.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout/activity_get_permission.xml b/app/src/main/res/layout/layout/activity_get_permission.xml
new file mode 100644
index 0000000..d681cc1
--- /dev/null
+++ b/app/src/main/res/layout/layout/activity_get_permission.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout/content_main_no_internet.xml b/app/src/main/res/layout/layout/content_main_no_internet.xml
new file mode 100644
index 0000000..6d08f3c
--- /dev/null
+++ b/app/src/main/res/layout/layout/content_main_no_internet.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout/content_main_webview.xml b/app/src/main/res/layout/layout/content_main_webview.xml
new file mode 100644
index 0000000..d8dfd47
--- /dev/null
+++ b/app/src/main/res/layout/layout/content_main_webview.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout/layout_notification.xml b/app/src/main/res/layout/layout/layout_notification.xml
new file mode 100644
index 0000000..c3fbb9d
--- /dev/null
+++ b/app/src/main/res/layout/layout/layout_notification.xml
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/layout_ghostmode.xml b/app/src/main/res/layout/layout_ghostmode.xml
new file mode 100644
index 0000000..439db9e
--- /dev/null
+++ b/app/src/main/res/layout/layout_ghostmode.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_nav_header.xml b/app/src/main/res/layout/layout_nav_header.xml
new file mode 100644
index 0000000..42ea4b4
--- /dev/null
+++ b/app/src/main/res/layout/layout_nav_header.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_splash.xml b/app/src/main/res/layout/layout_splash.xml
new file mode 100644
index 0000000..d8fb324
--- /dev/null
+++ b/app/src/main/res/layout/layout_splash.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/menu/navigation_items.xml b/app/src/main/res/layout/menu/navigation_items.xml
new file mode 100644
index 0000000..d2bfc6a
--- /dev/null
+++ b/app/src/main/res/layout/menu/navigation_items.xml
@@ -0,0 +1,24 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/values/strings.xml b/app/src/main/res/layout/values/strings.xml
new file mode 100644
index 0000000..f1720af
--- /dev/null
+++ b/app/src/main/res/layout/values/strings.xml
@@ -0,0 +1,11 @@
+
+
+ Support Me
+ GitHub
+ About
+ Listen On the Go
+ Navigation Button
+ AppFirstTime Open
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/exit_icon.png b/app/src/main/res/mipmap-hdpi/exit_icon.png
new file mode 100644
index 0000000..d8b89ec
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/exit_icon.png differ
diff --git a/app/src/main/res/mipmap-hdpi/exit_icon_2.png b/app/src/main/res/mipmap-hdpi/exit_icon_2.png
new file mode 100644
index 0000000..d4d8a84
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/exit_icon_2.png differ
diff --git a/app/src/main/res/mipmap-hdpi/exit_icon_3.png b/app/src/main/res/mipmap-hdpi/exit_icon_3.png
new file mode 100644
index 0000000..36b5b33
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/exit_icon_3.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ghost_icon.png b/app/src/main/res/mipmap-hdpi/ghost_icon.png
new file mode 100644
index 0000000..2f77750
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ghost_icon.png differ
diff --git a/app/src/main/res/mipmap-hdpi/grim_reaper_icon.png b/app/src/main/res/mipmap-hdpi/grim_reaper_icon.png
new file mode 100644
index 0000000..82755d3
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/grim_reaper_icon.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..898f3ed
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dffca36
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_exitdoor.png b/app/src/main/res/mipmap-hdpi/icon_exitdoor.png
new file mode 100644
index 0000000..9cfa349
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_exitdoor.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_exitdoor2.png b/app/src/main/res/mipmap-hdpi/icon_exitdoor2.png
new file mode 100644
index 0000000..7369184
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_exitdoor2.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_expand.png b/app/src/main/res/mipmap-hdpi/icon_expand.png
new file mode 100644
index 0000000..a7f5986
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_expand.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_expand2.png b/app/src/main/res/mipmap-hdpi/icon_expand2.png
new file mode 100644
index 0000000..c56cb98
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_expand2.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_menu1.jpg b/app/src/main/res/mipmap-hdpi/icon_menu1.jpg
new file mode 100644
index 0000000..8263d67
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_menu1.jpg differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_menu2.png b/app/src/main/res/mipmap-hdpi/icon_menu2.png
new file mode 100644
index 0000000..225d03f
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_menu2.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_menu3.png b/app/src/main/res/mipmap-hdpi/icon_menu3.png
new file mode 100644
index 0000000..1b18c8d
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_menu3.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_menu4.png b/app/src/main/res/mipmap-hdpi/icon_menu4.png
new file mode 100644
index 0000000..c5c404f
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_menu4.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_menu5.png b/app/src/main/res/mipmap-hdpi/icon_menu5.png
new file mode 100644
index 0000000..f899048
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_menu5.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_next.png b/app/src/main/res/mipmap-hdpi/icon_next.png
new file mode 100644
index 0000000..9f841f8
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_next.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_pause.png b/app/src/main/res/mipmap-hdpi/icon_pause.png
new file mode 100644
index 0000000..ba65cc3
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_pause.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_play.png b/app/src/main/res/mipmap-hdpi/icon_play.png
new file mode 100644
index 0000000..423bf63
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_play.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_previous.png b/app/src/main/res/mipmap-hdpi/icon_previous.png
new file mode 100644
index 0000000..b73f1c9
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_previous.png differ
diff --git a/app/src/main/res/mipmap-hdpi/icon_thumbnail.png b/app/src/main/res/mipmap-hdpi/icon_thumbnail.png
new file mode 100644
index 0000000..22303df
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/icon_thumbnail.png differ
diff --git a/app/src/main/res/mipmap-hdpi/logo_app1.png b/app/src/main/res/mipmap-hdpi/logo_app1.png
new file mode 100644
index 0000000..116210a
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/logo_app1.png differ
diff --git a/app/src/main/res/mipmap-hdpi/logo_app2.png b/app/src/main/res/mipmap-hdpi/logo_app2.png
new file mode 100644
index 0000000..d1d2869
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/logo_app2.png differ
diff --git a/app/src/main/res/mipmap-hdpi/logo_github.png b/app/src/main/res/mipmap-hdpi/logo_github.png
new file mode 100644
index 0000000..ccc6a86
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/logo_github.png differ
diff --git a/app/src/main/res/mipmap-ldpi/exit_icon.png b/app/src/main/res/mipmap-ldpi/exit_icon.png
new file mode 100644
index 0000000..31162f3
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/exit_icon.png differ
diff --git a/app/src/main/res/mipmap-ldpi/exit_icon_2.png b/app/src/main/res/mipmap-ldpi/exit_icon_2.png
new file mode 100644
index 0000000..e3b55ee
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/exit_icon_2.png differ
diff --git a/app/src/main/res/mipmap-ldpi/exit_icon_3.png b/app/src/main/res/mipmap-ldpi/exit_icon_3.png
new file mode 100644
index 0000000..58ed85d
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/exit_icon_3.png differ
diff --git a/app/src/main/res/mipmap-ldpi/ghost_icon.png b/app/src/main/res/mipmap-ldpi/ghost_icon.png
new file mode 100644
index 0000000..419a5a3
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/ghost_icon.png differ
diff --git a/app/src/main/res/mipmap-ldpi/grim_reaper_icon.png b/app/src/main/res/mipmap-ldpi/grim_reaper_icon.png
new file mode 100644
index 0000000..a628285
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/grim_reaper_icon.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_exitdoor.png b/app/src/main/res/mipmap-ldpi/icon_exitdoor.png
new file mode 100644
index 0000000..dcfae65
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_exitdoor.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_exitdoor2.png b/app/src/main/res/mipmap-ldpi/icon_exitdoor2.png
new file mode 100644
index 0000000..2f11a2f
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_exitdoor2.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_expand.png b/app/src/main/res/mipmap-ldpi/icon_expand.png
new file mode 100644
index 0000000..4f6e1f4
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_expand.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_expand2.png b/app/src/main/res/mipmap-ldpi/icon_expand2.png
new file mode 100644
index 0000000..b032518
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_expand2.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_menu1.jpg b/app/src/main/res/mipmap-ldpi/icon_menu1.jpg
new file mode 100644
index 0000000..bed41c8
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_menu1.jpg differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_menu2.png b/app/src/main/res/mipmap-ldpi/icon_menu2.png
new file mode 100644
index 0000000..1d6bc37
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_menu2.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_menu3.png b/app/src/main/res/mipmap-ldpi/icon_menu3.png
new file mode 100644
index 0000000..70a40d2
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_menu3.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_menu4.png b/app/src/main/res/mipmap-ldpi/icon_menu4.png
new file mode 100644
index 0000000..a640716
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_menu4.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_menu5.png b/app/src/main/res/mipmap-ldpi/icon_menu5.png
new file mode 100644
index 0000000..09715eb
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_menu5.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_next.png b/app/src/main/res/mipmap-ldpi/icon_next.png
new file mode 100644
index 0000000..aff0b6a
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_next.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_pause.png b/app/src/main/res/mipmap-ldpi/icon_pause.png
new file mode 100644
index 0000000..cb0ac8e
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_pause.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_play.png b/app/src/main/res/mipmap-ldpi/icon_play.png
new file mode 100644
index 0000000..f3d45ae
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_play.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_previous.png b/app/src/main/res/mipmap-ldpi/icon_previous.png
new file mode 100644
index 0000000..cc6b030
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_previous.png differ
diff --git a/app/src/main/res/mipmap-ldpi/icon_thumbnail.png b/app/src/main/res/mipmap-ldpi/icon_thumbnail.png
new file mode 100644
index 0000000..85b154c
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/icon_thumbnail.png differ
diff --git a/app/src/main/res/mipmap-ldpi/logo_app1.png b/app/src/main/res/mipmap-ldpi/logo_app1.png
new file mode 100644
index 0000000..7be79ba
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/logo_app1.png differ
diff --git a/app/src/main/res/mipmap-ldpi/logo_app2.png b/app/src/main/res/mipmap-ldpi/logo_app2.png
new file mode 100644
index 0000000..03d5f5d
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/logo_app2.png differ
diff --git a/app/src/main/res/mipmap-ldpi/logo_github.png b/app/src/main/res/mipmap-ldpi/logo_github.png
new file mode 100644
index 0000000..d1b19f1
Binary files /dev/null and b/app/src/main/res/mipmap-ldpi/logo_github.png differ
diff --git a/app/src/main/res/mipmap-mdpi/exit_icon.png b/app/src/main/res/mipmap-mdpi/exit_icon.png
new file mode 100644
index 0000000..fb1dd35
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/exit_icon.png differ
diff --git a/app/src/main/res/mipmap-mdpi/exit_icon_2.png b/app/src/main/res/mipmap-mdpi/exit_icon_2.png
new file mode 100644
index 0000000..2b94a17
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/exit_icon_2.png differ
diff --git a/app/src/main/res/mipmap-mdpi/exit_icon_3.png b/app/src/main/res/mipmap-mdpi/exit_icon_3.png
new file mode 100644
index 0000000..fade6b2
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/exit_icon_3.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ghost_icon.png b/app/src/main/res/mipmap-mdpi/ghost_icon.png
new file mode 100644
index 0000000..7fec083
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ghost_icon.png differ
diff --git a/app/src/main/res/mipmap-mdpi/grim_reaper_icon.png b/app/src/main/res/mipmap-mdpi/grim_reaper_icon.png
new file mode 100644
index 0000000..1eb8923
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/grim_reaper_icon.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..64ba76f
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dae5e08
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_exitdoor.png b/app/src/main/res/mipmap-mdpi/icon_exitdoor.png
new file mode 100644
index 0000000..92ea411
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_exitdoor.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_exitdoor2.png b/app/src/main/res/mipmap-mdpi/icon_exitdoor2.png
new file mode 100644
index 0000000..3e9430b
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_exitdoor2.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_expand.png b/app/src/main/res/mipmap-mdpi/icon_expand.png
new file mode 100644
index 0000000..d9ba854
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_expand.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_expand2.png b/app/src/main/res/mipmap-mdpi/icon_expand2.png
new file mode 100644
index 0000000..1ee7b12
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_expand2.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_menu1.jpg b/app/src/main/res/mipmap-mdpi/icon_menu1.jpg
new file mode 100644
index 0000000..12ce7aa
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_menu1.jpg differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_menu2.png b/app/src/main/res/mipmap-mdpi/icon_menu2.png
new file mode 100644
index 0000000..8793cda
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_menu2.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_menu3.png b/app/src/main/res/mipmap-mdpi/icon_menu3.png
new file mode 100644
index 0000000..436f5da
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_menu3.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_menu4.png b/app/src/main/res/mipmap-mdpi/icon_menu4.png
new file mode 100644
index 0000000..02b1294
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_menu4.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_menu5.png b/app/src/main/res/mipmap-mdpi/icon_menu5.png
new file mode 100644
index 0000000..3f150cc
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_menu5.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_next.png b/app/src/main/res/mipmap-mdpi/icon_next.png
new file mode 100644
index 0000000..131350b
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_next.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_pause.png b/app/src/main/res/mipmap-mdpi/icon_pause.png
new file mode 100644
index 0000000..fded43f
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_pause.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_play.png b/app/src/main/res/mipmap-mdpi/icon_play.png
new file mode 100644
index 0000000..b3f70ea
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_play.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_previous.png b/app/src/main/res/mipmap-mdpi/icon_previous.png
new file mode 100644
index 0000000..160f4dc
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_previous.png differ
diff --git a/app/src/main/res/mipmap-mdpi/icon_thumbnail.png b/app/src/main/res/mipmap-mdpi/icon_thumbnail.png
new file mode 100644
index 0000000..7b18be9
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/icon_thumbnail.png differ
diff --git a/app/src/main/res/mipmap-mdpi/logo_app1.png b/app/src/main/res/mipmap-mdpi/logo_app1.png
new file mode 100644
index 0000000..0adf9fe
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/logo_app1.png differ
diff --git a/app/src/main/res/mipmap-mdpi/logo_app2.png b/app/src/main/res/mipmap-mdpi/logo_app2.png
new file mode 100644
index 0000000..432aa82
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/logo_app2.png differ
diff --git a/app/src/main/res/mipmap-mdpi/logo_github.png b/app/src/main/res/mipmap-mdpi/logo_github.png
new file mode 100644
index 0000000..62cb1a0
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/logo_github.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/exit_icon.png b/app/src/main/res/mipmap-xhdpi/exit_icon.png
new file mode 100644
index 0000000..7962b06
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/exit_icon.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ghost_icon.png b/app/src/main/res/mipmap-xhdpi/ghost_icon.png
new file mode 100644
index 0000000..e6014ca
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ghost_icon.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/grim_reaper_icon.png b/app/src/main/res/mipmap-xhdpi/grim_reaper_icon.png
new file mode 100644
index 0000000..0f7d9b1
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/grim_reaper_icon.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..e5ed465
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..14ed0af
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_exitdoor.png b/app/src/main/res/mipmap-xhdpi/icon_exitdoor.png
new file mode 100644
index 0000000..4eba0b2
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_exitdoor.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_exitdoor2.png b/app/src/main/res/mipmap-xhdpi/icon_exitdoor2.png
new file mode 100644
index 0000000..0e8a3d0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_exitdoor2.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_expand.png b/app/src/main/res/mipmap-xhdpi/icon_expand.png
new file mode 100644
index 0000000..b60fd99
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_expand.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_expand2.png b/app/src/main/res/mipmap-xhdpi/icon_expand2.png
new file mode 100644
index 0000000..db15cee
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_expand2.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_next.png b/app/src/main/res/mipmap-xhdpi/icon_next.png
new file mode 100644
index 0000000..455f334
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_next.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_pause.png b/app/src/main/res/mipmap-xhdpi/icon_pause.png
new file mode 100644
index 0000000..d0c0a5c
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_pause.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_play.png b/app/src/main/res/mipmap-xhdpi/icon_play.png
new file mode 100644
index 0000000..eab75f0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_play.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_previous.png b/app/src/main/res/mipmap-xhdpi/icon_previous.png
new file mode 100644
index 0000000..94e1ef0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_previous.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_thumbnail.png b/app/src/main/res/mipmap-xhdpi/icon_thumbnail.png
new file mode 100644
index 0000000..d4b4dc2
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_thumbnail.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/logo_app1.png b/app/src/main/res/mipmap-xhdpi/logo_app1.png
new file mode 100644
index 0000000..65e5322
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/logo_app1.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/logo_app2.png b/app/src/main/res/mipmap-xhdpi/logo_app2.png
new file mode 100644
index 0000000..81e93bf
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/logo_app2.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b0907ca
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..d8ae031
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_exitdoor2.png b/app/src/main/res/mipmap-xxhdpi/icon_exitdoor2.png
new file mode 100644
index 0000000..dec7314
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_exitdoor2.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/logo_app1.png b/app/src/main/res/mipmap-xxhdpi/logo_app1.png
new file mode 100644
index 0000000..9e91357
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/logo_app1.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/logo_app2.png b/app/src/main/res/mipmap-xxhdpi/logo_app2.png
new file mode 100644
index 0000000..d3aa959
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/logo_app2.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..2c18de9
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..beed3cd
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
new file mode 100644
index 0000000..8f59610
--- /dev/null
+++ b/app/src/main/res/values/attrs.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..ca4cfd9
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,22 @@
+
+
+ #243F5A
+ #455A64
+ #ffffff
+
+ #e46822
+ #780006
+ #ae3b2e
+ #ffedc5
+ #f1ac8e
+
+
+ #03a9f4
+ #18181c
+ #3e3e43
+ #03a9f4
+ #64ffda
+ #ffe57f
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..d5e64b5
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,35 @@
+
+ Backk
+ Get Permission
+ go ghost
+ exit
+ SHAREDPREFERENCE_KEYFILE
+ INITIALIZED
+
+ Permit to Draw over other apps
+ Allow this app to draw over other apps. This permission allows an app to display on the top of other apps you\'re using.
+
+ Retry
+ No Internet Connection
+
+
+
+
+ Settings
+ REPEAT_TYPE
+ NO_OF_REPEATS
+ PLAYER_TYPE
+
+ M8,5v14l11,-7z
+ M6,19h4V5H6v14zm8,-14v14h4V5h-4z
+
+ FullscreenWebPlayer
+ M413.1,327.3l-1.8-2.1l-136-156.5c-4.6-5.3-11.5-8.6-19.2-8.6c-7.7,0-14.6,3.4-19.2,8.6L101,324.9l-2.3,2.6 \tC97,330,96,333,96,336.2c0,8.7,7.4,15.8,16.6,15.8v0h286.8v0c9.2,0,16.6-7.1,16.6-15.8C416,332.9,414.9,329.8,413.1,327.3z
+
+ search
+ Search YouTube
+ VIDEO_QUALITY
+ FINISH_ON_END
+ SearchActivity
+ COUNT
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..8f9836a
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..8d3ef8e
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+
+ repositories {
+ google()
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.2.1'
+
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..82618ce
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,15 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..9a4163a
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app'