Skip to content

Commit

Permalink
Merge pull request #45 from AbdurazaaqMohammed/main
Browse files Browse the repository at this point in the history
Take WRITE_EXTERNAL_STORAGE permission only on versions that need it and request it only when needed
  • Loading branch information
prateek-chaubey authored Jun 24, 2024
2 parents 684f187 + 22d30f5 commit a956048
Show file tree
Hide file tree
Showing 4 changed files with 425 additions and 368 deletions.
36 changes: 35 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.youtube.pro">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="27" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:allowBackup="true"
Expand All @@ -25,6 +26,39 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="www.youtube.com" />
<data android:scheme="https" android:host="youtu.be" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity
android:name=".DownloadFromIntentFilter"
android:configChanges="orientation|screenSize|keyboardHidden|smallestScreenSize|screenLayout"
android:hardwareAccelerated="true"
android:supportsPictureInPicture="true"
android:theme="@style/NoActionBar"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter android:label="@string/dl">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="www.youtube.com" />
<data android:scheme="https" android:host="youtu.be" />
</intent-filter>
<intent-filter android:label="@string/dl">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<service
android:name=".ForegroundService"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.google.android.youtube.pro;

import android.os.Bundle;

public class DownloadFromIntentFilter extends MainActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

load(true);
}
}
Loading

0 comments on commit a956048

Please sign in to comment.