Skip to content

Commit

Permalink
*Support for DailyMotion downloader
Browse files Browse the repository at this point in the history
*Support for Vimeo Downloader
*Added Instagram story saver #15
*Fixed Instagram bug #18
*Added FCM Service to track user and provide better user experience
*Updated Terms and Condition
*Update to version 5.0.0(beta)
  • Loading branch information
Udhayarajan committed Jan 21, 2023
1 parent 6173a0e commit 4ae94d0
Show file tree
Hide file tree
Showing 26 changed files with 1,034 additions and 224 deletions.
6 changes: 5 additions & 1 deletion .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions .idea/runConfigurations/app.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 24 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ android {
compileSdkVersion 32
buildToolsVersion "30.0.3"

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}
defaultConfig {
applicationId "com.mugames.vidsnap"
minSdkVersion 21
targetSdkVersion 32
versionCode 11
versionName "4.1.0"
versionCode 12
versionName "5.0.0(beta)"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
debug{
debug {
minifyEnabled false
ext.enableCrashlytics = false
}
Expand Down Expand Up @@ -75,7 +78,7 @@ dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

// implementation files('libs/java-json.jar')
implementation 'org.json:json:20220924'

implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'com.google.firebase:firebase-config:'
Expand All @@ -86,13 +89,18 @@ dependencies {
implementation "androidx.tonyodev.fetch2:xfetch2:3.1.6"

//FFmpeg-kit
implementation project(path: ':ffmpeg-kit-android-lib') //Comment this line on static built library
implementation project(path: ':ffmpeg-kit-android-lib')
//Comment this line on static built library
// implementation 'com.arthenica:ffmpeg-kit-full:4.4.LTS' // Uncomment this line on static built library

//Glide
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.github.bumptech.glide:glide:4.13.1'
implementation 'androidx.browser:browser:1.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

//FCM
implementation 'com.google.firebase:firebase-messaging-ktx:23.1.0'

annotationProcessor 'com.github.bumptech.glide:compiler:4.13.1'


testImplementation 'junit:junit:4.13.2'
Expand All @@ -102,8 +110,6 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.5.0'




//Room
def room_version = "2.4.3"
implementation "androidx.room:room-runtime:$room_version"
Expand All @@ -120,10 +126,16 @@ dependencies {
//LeakCanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'

//VidSnapKit
// implementation 'com.github.Udhayarajan:VidSnapKit:0.0.1'
// CircleImageView
implementation 'de.hdodenhof:circleimageview:3.1.0'

implementation 'com.github.Udhayarajan:VidSnapKit:1.1.0-beta'
//Json to Object converter
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.14.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1'

//VidSnapKit
implementation 'io.github.udhayarajan:VidSnapKit:2.0.2'


}
17 changes: 13 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@
android:supportsRtl="true"
android:theme="@style/Theme.YouTubeDownloader"
tools:targetApi="R">
<service
android:name=".FcmService"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

<receiver
android:name=".utility.VideoSharedBroadcast"
android:enabled="true"
android:exported="false"/>
android:exported="false" />

<activity
android:name=".ui.activities.ContactActivity"
Expand All @@ -53,11 +62,11 @@
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<action android:name="android.intent.action.SEND" />

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.DEFAULT" />

<data android:mimeType="video/*"/>
<data android:mimeType="video/*" />
</intent-filter>
</activity>
<activity
Expand Down
32 changes: 32 additions & 0 deletions app/src/main/java/com/mugames/vidsnap/FcmService.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* This file is part of VidSnap.
*
* VidSnap is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
* VidSnap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with VidSnap. If not, see <https://www.gnu.org/licenses/>.
*
*/

package com.mugames.vidsnap

import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.google.firebase.messaging.FirebaseMessagingService
import com.mugames.vidsnap.storage.AppPref

class FcmService : FirebaseMessagingService() {
override fun onNewToken(token: String) {
super.onNewToken(token)
AppPref.getInstance(baseContext).saveFcmToken(token)
FirebaseCrashlytics.getInstance().setCustomKey(
"FCMToken",
AppPref.getInstance(this).fcmToken!!
)
}
}
1 change: 1 addition & 0 deletions app/src/main/java/com/mugames/vidsnap/PopUpDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public void show(String text) {
View v = activity.getLayoutInflater().inflate(R.layout.loading_dialog, null);
textView = v.findViewById(R.id.process_name);
textView.setText(text);
textView.setSelected(true);
dialogBuilder.setView(v);
dialogBuilder.setCancelable(false);
dialog = dialogBuilder.create();
Expand Down
33 changes: 22 additions & 11 deletions app/src/main/java/com/mugames/vidsnap/Terms.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
package com.mugames.vidsnap;

import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ScrollView;
import android.widget.Toast;

import androidx.appcompat.app.AlertDialog;

Expand All @@ -45,17 +48,25 @@ public void show(){
agree.setAlpha(.75f);
agree.setEnabled(false);
CheckBox checkBox=v.findViewById(R.id.term_checkbox);
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(checkBox.isChecked()){
agree.setAlpha(1);
agree.setEnabled(true);
}
else {
agree.setAlpha(.75f);
agree.setEnabled(false);
}
Toast.makeText(activity, "Scroll and read to end to enable \"Agree", Toast.LENGTH_LONG).show();

ScrollView scrollView = v.findViewById(R.id.term_content);
scrollView.getViewTreeObserver().addOnScrollChangedListener(() -> {
View view = scrollView.getChildAt(scrollView.getChildCount() - 1);
int topDetector = scrollView.getScrollY();
int bottomDetector = view.getBottom() - (scrollView.getHeight() + scrollView.getScrollY());
if (bottomDetector == 0) {
checkBox.setEnabled(true);
}
});
checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
if(checkBox.isChecked()){
agree.setAlpha(1);
agree.setEnabled(true);
}
else {
agree.setAlpha(.75f);
agree.setEnabled(false);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.mugames.vidsnap.firebase.FirebaseCallBacks.UpdateCallbacks;
import com.mugames.vidsnap.R;
import com.mugames.vidsnap.storage.AppPref;
import com.mugames.vidsnap.utility.UtilityInterface;
import com.mugames.vidsnap.ui.activities.ReportActivity;

Expand Down Expand Up @@ -164,7 +165,7 @@ public void initReport() {


public void saveReport(ReportActivity reportActivity, REPORT type, String service, String des, String mail) {
ReportHelper report = new ReportHelper(service, des, mail);
ReportHelper report = new ReportHelper(service, des, mail, AppPref.getInstance(reportActivity).getFcmToken());

ValueEventListener saveListener = new ValueEventListener() {
@Override
Expand Down Expand Up @@ -238,10 +239,13 @@ public static class ReportHelper {
public String des;
public String mail;

public ReportHelper(String service, String des, String mail) {
public String tokenFcmService;

public ReportHelper(String service, String des, String mail, String tokenFcmService) {
this.service = service;
this.des = des;
this.mail = mail;
this.tokenFcmService = tokenFcmService;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class HttpRequest{
String type;
String data;

public HttpRequest(MainActivity activity, String videoURL, String cookies, Hashtable<String,String> headers, String type, String data, String user_agent, UtilityInterface.ResponseCallBack callBack){
public HttpRequest(MainActivity activity, String videoURL, String cookies, Hashtable<String,String> headers, String type, String data, UtilityInterface.ResponseCallBack callBack){
try {
this.cookies=cookies;
this.callBack=callBack;
Expand Down
Loading

0 comments on commit 4ae94d0

Please sign in to comment.