Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #11 from ExploiTR/patch_1
Browse files Browse the repository at this point in the history
update 1.1.2
  • Loading branch information
ExploiTR authored Oct 30, 2019
2 parents bda1534 + 61fa9b7 commit 7ac7389
Show file tree
Hide file tree
Showing 41 changed files with 3,087 additions and 96 deletions.
20 changes: 10 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,23 @@ repositories {

android {
signingConfigs {

}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "app.exploitr.nsg.youp3"
minSdkVersion 19
targetSdkVersion 28
versionCode 91020719
versionName "1.1.0"
versionCode 91021030
versionName "1.1.2"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
debug {
/* minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' */
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
release {
Expand All @@ -61,16 +60,16 @@ dependencies {
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true
}
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.koushikdutta.ion:ion:2.2.1'
implementation 'com.koushikdutta.ion:ion:3.0.8'
implementation('com.github.wangjiegulu:rfab:2.0.0') {
exclude group: 'com.android.support'
}

implementation 'com.github.HaarigerHarald:android-youtubeExtractor:v1.9.0'
implementation 'com.github.HaarigerHarald:android-youtubeExtractor:master-SNAPSHOT'
//noinspection GradleDependency
annotationProcessor 'com.google.auto.value:auto-value:1.1'
implementation('com.google.android.exoplayer:exoplayer:2.10.1') {
Expand Down Expand Up @@ -99,8 +98,9 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.github.esafirm:rxdownloader:2.0.0'
implementation 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
implementation ('com.obsez.android.lib.filechooser:filechooser:1.2.0'){
implementation('com.obsez.android.lib.filechooser:filechooser:1.2.0') {
exclude group: 'com.android.support'
}
implementation 'com.github.lzyzsd:circleprogress:1.2.1'
implementation 'org.greenrobot:eventbus:3.1.1'
}
3 changes: 0 additions & 3 deletions app/fabric.properties

This file was deleted.

22 changes: 11 additions & 11 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<application
android:name=".YouWorker"
android:name="utils.YouWorker"
android:allowBackup="false"
android:appComponentFactory="android.support.v4.app.CoreComponentFactory"
android:hardwareAccelerated="true"
Expand All @@ -27,10 +27,10 @@
tools:replace="android:allowBackup,android:supportsRtl,android:theme,android:appComponentFactory"
tools:targetApi="p">
<activity
android:name=".AudioConverter"
android:name=".ui_access.AudioConverter"
android:theme="@style/ConverterActivity" />
<activity
android:name=".MainActivity"
android:name=".ui_access.MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
Expand All @@ -40,43 +40,43 @@
</intent-filter>
</activity>
<activity
android:name=".AboutActivity"
android:name=".ui_access.AboutActivity"
android:theme="@style/AboutActivity" />

<meta-data
android:name="io.fabric.ApiKey"
android:value="########################################" />
android:value="b531c330857e24f378d562b1176ce4574483c2be" />
<meta-data
android:name="android.webkit.WebView.MetricsOptOut"
android:value="true" />

<activity
android:name=".DownloadsActivity"
android:name=".ui_access.DownloadsActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/DownloadsActivity" />
<activity
android:name=".BookMarkActivity"
android:name=".ui_access.BookMarkActivity"
android:theme="@style/BookmarkActivity" />

<service android:name="downloader.utils.DownloadExecutorService" />

<activity
android:name=".SettingsActivity"
android:name=".ui_access.SettingsActivity"
android:theme="@style/SettingsActivity" />
<service android:name="converter.utils.ConverterService" />

<activity
android:name=".MediaPlayer"
android:name="utils.MediaPlayer"
android:excludeFromRecents="true"
android:launchMode="singleInstance"
android:supportsPictureInPicture="true"
android:theme="@style/AppTheme.MediaPlayer"
tools:targetApi="n" />
<activity
android:name=".IntroActivity"
android:name=".ui_access.IntroActivity"
android:theme="@style/Theme.Intro" />
<activity
android:name=".SuperIntentReceiver"
android:name=".ui_access.SuperIntentReceiver"
android:label="Direct">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down
45 changes: 45 additions & 0 deletions app/src/main/java/app/exploitr/nsg/youp3/Book/BookMark.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package app.exploitr.nsg.youp3.Book;

import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;

public class BookMark extends RealmObject {

@PrimaryKey
private int id;
private String title;
private String url;
private String favicon;

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getTitle() {
return title;
}

public void setTitle(String title) {
this.title = title;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
}

public String getFavicon() {
return favicon;
}

public void setFavicon(String favicon) {
this.favicon = favicon;
}
}
126 changes: 126 additions & 0 deletions app/src/main/java/app/exploitr/nsg/youp3/Book/BookMarkAdapter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
package app.exploitr.nsg.youp3.Book;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.mikhaellopez.circularimageview.CircularImageView;

import java.util.List;

import app.exploitr.nsg.youp3.R;



/*
* Created by exploitr on 28-09-2017.
*/

public class BookMarkAdapter extends RecyclerView.Adapter<BookMarkAdapter.ViewHolder> {

private List<String> mData;
private LayoutInflater mInflater;
private ItemClickListener mClickListener;
private ItemLongClickListener mLongClickListener;

public BookMarkAdapter(Context context, List<String> data) {
this.mInflater = LayoutInflater.from(context);
this.mData = data;
}

public void notifyDataSetChangedCustom(List<String> newdata) {
mData.clear();
mData.addAll(newdata);
this.notifyDataSetChanged();
}

@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = mInflater.inflate(R.layout.row_bookmarks_list_item, parent, false);
return new ViewHolder(view);
}

@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
String[] x = mData.get(position).split(",");
holder.titleTextView.setText(x[1]);
holder.urlTextView.setText(x[2]);
holder.id = Integer.parseInt(x[0]);

byte[] decodedString = Base64.decode(x[3], Base64.DEFAULT);
Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);

holder.favicon.setImageBitmap(decodedByte);
}

@Override
public int getItemCount() {
return mData.size();
}

public void setClickListener(ItemClickListener itemClickListener) {
this.mClickListener = itemClickListener;
}

public void setLongClickListener(ItemLongClickListener itemLongClickListener) {
this.mLongClickListener = itemLongClickListener;
}

public interface ItemClickListener {
void onOpenClick(String url);
}

public interface ItemLongClickListener {
void onDeleteClick(int id);
}

class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
TextView urlTextView, titleTextView;
CircularImageView favicon;
LinearLayout clicker;
int id;

ViewHolder(View itemView) {
super(itemView);
id = 0;
urlTextView = itemView.findViewById(R.id.urlView);
titleTextView = itemView.findViewById(R.id.titleView);
favicon = itemView.findViewById(R.id.favicon);
clicker = itemView.findViewById(R.id.bookmarkClickable);

clicker.setOnClickListener(this);
clicker.setOnLongClickListener(this);
itemView.setOnClickListener(this);
}

@Override
public void onClick(View view) {
if (mClickListener != null) {
if (view.getId() == clicker.getId()) {
mClickListener.onOpenClick(urlTextView.getText().toString());
}
}
}

@Override
public boolean onLongClick(View view) {
if (mLongClickListener != null) {
if (view.getId() == clicker.getId()) {
mLongClickListener.onDeleteClick(id);
}
}
return true;
}
}

}
50 changes: 50 additions & 0 deletions app/src/main/java/app/exploitr/nsg/youp3/Book/BookMarkManager.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package app.exploitr.nsg.youp3.Book;

/*
* Created by exploitr on 25-09-2017.
*
* I've created a new instance for each getters.
* I don't know but think If the data is updated at the middle,
* an old instance wouldn't return the updated data
*/

import io.realm.Realm;

public class BookMarkManager {

private Realm realm;

public BookMarkManager() {
realm = Realm.getDefaultInstance();
}

private BookRealmController getController() {
return new BookRealmController();
}

public void push(int id, String title, String url, String favicon) {
BookMark info = new BookMark();

info.setId(id);
info.setTitle(title);
info.setUrl(url);
info.setFavicon(favicon);

realm.beginTransaction();
realm.copyToRealmOrUpdate(info);
realm.commitTransaction();
}


public String getTitleById(int id) {
return getController().getBookMark(id).getTitle();
}

public int getTotalInfoCount() {
return getController().getBookMarks().size();
}

public void removeInfoById(int id) {
getController().deleteBookMark(id);
}
}
Loading

0 comments on commit 7ac7389

Please sign in to comment.