Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions frontend/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" tools:node="remove"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>
<queries>
<intent>
<action android:name="android.intent.action.VIEW"/>
Expand Down
1 change: 0 additions & 1 deletion frontend/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const defaultStaticConfig = {
blockedPermissions: [
"android.permission.SYSTEM_ALERT_WINDOW",
"android.permission.READ_PHONE_STATE",
"android.permission.WRITE_EXTERNAL_STORAGE"
],
allowBackup: false,
intentFilters: [
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/ArticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ const ArticleCard = ({
try {
const storageGranted = await requestStoragePermissions();
if (!storageGranted) {
Alert.alert('Storage permission denied');
return;
}
if (!isConnected) {
Expand Down
7 changes: 1 addition & 6 deletions frontend/src/helper/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import NetInfo from '@react-native-community/netinfo';
import {Category, CategoryType, PodcastData} from '../type';
import AsyncStorage from '@react-native-async-storage/async-storage';
import {GET_STORAGE_DATA} from './APIUtils';
import {Alert, Linking, PermissionsAndroid, Platform} from 'react-native';
import {Alert, Linking, Platform} from 'react-native';
import RNFS from 'react-native-fs';
import {secureClearAllItems} from './SecureStorageUtils';
import {
Expand Down Expand Up @@ -344,13 +344,9 @@ export const requestStoragePermissions = async () => {

if ((Platform.Version as number) < 33) {
const granted = await PermissionsAndroid.requestMultiple([
PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE,
PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,
]);

return (
granted['android.permission.READ_EXTERNAL_STORAGE'] === PermissionsAndroid.RESULTS.GRANTED &&
granted['android.permission.WRITE_EXTERNAL_STORAGE'] === PermissionsAndroid.RESULTS.GRANTED
);
} else {
const granted = await PermissionsAndroid.requestMultiple([
Expand All @@ -367,7 +363,6 @@ export const downloadAudio = async (_podcast: PodcastData) => {
// Check for existing downloads
const storageGranted = await requestStoragePermissions();
if (!storageGranted) {
Alert.alert('Storage permission denied');
return;
}
const existingPodcasts = await readDownloadedPodcasts();
Expand Down
7 changes: 0 additions & 7 deletions frontend/src/screens/PodcastRecorder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const PodcastRecorder = ({navigation, route}: PodcastRecorderScreenProps) => {

const storageGranted = await requestStoragePermissions();
if (!storageGranted) {
Alert.alert('Storage permission denied');
return;
}

Expand Down Expand Up @@ -111,15 +110,9 @@ const PodcastRecorder = ({navigation, route}: PodcastRecorderScreenProps) => {

// const startRecording = async () => {
// if (Platform.OS === 'android') {
// const granted = await PermissionsAndroid.requestMultiple([
// PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,
// PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,
// ]);
// if (
// granted['android.permission.RECORD_AUDIO'] !==
// PermissionsAndroid.RESULTS.GRANTED
// ) {
// console.warn('Permission denied');
// return;
// }
// }
Expand Down
Loading