Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

[Independent APK] #520

Draft
wants to merge 103 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
74d4ce0
Revert "Merge pull request #498 from ente-io/independent"
ua741 Sep 22, 2022
9cbcd25
Merge branch 'master' into independent
ua741 Sep 23, 2022
411b3b6
Merge branch 'independent' of github.com:ente-io/frame into independent
vishnukvmd Sep 29, 2022
b4fa1da
Remove alice
vishnukvmd Sep 29, 2022
308693d
Skip recent folder on android
ua741 Sep 29, 2022
93a4869
Disable Recent for Android
vishnukvmd Sep 29, 2022
496d1a5
Merge branch 'master' into independent
vishnukvmd Sep 29, 2022
6f366cc
Merge branch 'master' into independent
vishnukvmd Sep 29, 2022
5ea1817
Merge branch 'master' into independent
ua741 Oct 3, 2022
d9287ef
Merge branch 'independent' of github.com:ente-io/frame into independent
ua741 Oct 3, 2022
2966670
update pubspec
ua741 Oct 3, 2022
9077188
Merge branch 'master' into independent
ua741 Oct 3, 2022
18e87fc
Merge branch 'master' into independent
ua741 Oct 3, 2022
0e49163
Merge branch 'master' into independent
ua741 Oct 15, 2022
bc0aa57
Merge branch 'bump_version_374' into independent
ua741 Oct 15, 2022
0d295f1
fix cache
ua741 Oct 15, 2022
3944457
Merge branch 'master' into independent
ua741 Oct 15, 2022
13419d0
Add fileProvider for open_file pkg
ua741 Oct 17, 2022
9e2e8af
Log failure in open apk action
ua741 Oct 17, 2022
eaf9256
AppUpdate: Add link to install manually
ua741 Oct 17, 2022
fce9677
pubspec changes due to flutter downgrade
ua741 Oct 17, 2022
b3007d5
bump version to 0.6.46+376
ua741 Oct 17, 2022
ea21c9e
Merge pull request #578 from ente-io/fixApkUpdate
ua741 Oct 17, 2022
446144a
Merge branch 'master' into independent
ua741 Oct 18, 2022
f54bc18
Merge branch 'master' into independent
ua741 Oct 25, 2022
669a1bd
Merge branch 'release_hot_fix' into independent
ua741 Oct 26, 2022
c8122ea
Merge branch 'master' into independent
ua741 Nov 7, 2022
12662bd
Merge branch 'update_dialog' into independent
ua741 Nov 9, 2022
e2cf6a1
Merge branch 'master' into independent
ua741 Nov 24, 2022
233b17c
bump version to 0.6.70+390
ua741 Nov 24, 2022
3cc4bed
Merge branch 'bump_version' into independent
ua741 Nov 24, 2022
20f6fb0
Merge branch 'master' into independent
ua741 Dec 12, 2022
6a74258
Merge branch 'main' into independent
ua741 Dec 19, 2022
9cb58af
Merge branch 'main' into independent
ua741 Jan 4, 2023
bb180f7
Merge branch 'main' into independent
ua741 Jan 7, 2023
0d9ad9b
Merge branch 'hide_debug_section' into independent
ua741 Jan 9, 2023
931282e
Merge branch 'release_reset_ignore_fix' into independent
ua741 Jan 9, 2023
036cf28
Merge branch 'release_v07_20' into independent
ua741 Feb 4, 2023
aad66ea
Merge branch 'main' into independent
ua741 Feb 27, 2023
33622d1
Fix merge conflicts
ua741 Feb 27, 2023
98a799f
Merge branch 'main' into independent
ua741 Feb 27, 2023
6c836c8
Merge branch 'bumb_media' into independent
ua741 Mar 3, 2023
ee16697
Upgrade media extension pkg
ua741 Mar 4, 2023
34e113e
Bump version v0.7.32
ua741 Mar 4, 2023
129f153
Merge branch 'release_patch' into independent
ua741 Mar 4, 2023
2e9e1fd
Merge branch 'main' into independent
ua741 Mar 17, 2023
38bcce8
Merge branch 'main' into independent
ua741 Mar 17, 2023
53cf38b
Merge branch 'main' into independent
ua741 Apr 22, 2023
a742e52
Merge branch 'main' into independent
ua741 Apr 25, 2023
b6f739c
Merge branch 'main' into independent
ua741 Apr 26, 2023
40d8f6d
Cherry-pick changes for invalid location check
ua741 May 3, 2023
a0ee80f
bump version to 0.7.46+446
ua741 May 3, 2023
0988e4b
Merge branch 'patch_release_3_may_23' into independent
ua741 May 3, 2023
e13bb57
Fix bug in handling file update
ua741 May 3, 2023
ad8a6ce
bump version to 0.7.48+448
ua741 May 4, 2023
40d80be
Merge branch 'patch_release_3_may_23' into independent
ua741 May 4, 2023
9b6c6f6
Merge branch 'main' into independent
ua741 May 8, 2023
9107cfa
Merge branch 'main' into independent
ua741 May 10, 2023
2b9a12b
Merge branch 'main' into independent
ua741 May 17, 2023
692ef74
Merge branch 'bump-version-20230526130947' into independent
ua741 May 26, 2023
15c2877
Merge branch 'main' into independent
ua741 May 26, 2023
c568140
Merge branch 'main' into independent
ua741 May 27, 2023
923372a
Merge branch 'main' into independent
ua741 May 29, 2023
a12cf17
Merge branch 'main' into independent
ua741 Jun 2, 2023
cb1a4be
Merge branch 'main' into independent
ua741 Jun 13, 2023
e1110d8
Merge branch 'bump-version-20230614074325' into independent
ua741 Jun 14, 2023
21e2c13
Merge branch 'main' into independent
ua741 Jun 29, 2023
c412a12
Merge branch 'main' into independent
ua741 Jun 29, 2023
db12af9
Merge branch 'main' into independent
ua741 Jun 29, 2023
6cc0f45
Merge branch 'main' into independent
ua741 Jun 30, 2023
d5b3076
Merge branch 'main' into independent
ua741 Jul 3, 2023
a64143b
Ensure unique paths for every upload (#1307)
vishnukvmd Aug 9, 2023
1efd52f
Bump version to 0.7.80+480
ua741 Aug 10, 2023
9177d5c
Merge branch 'release_patch_10_aug' into independent
ua741 Aug 10, 2023
37449c8
Merge branch 'main' into independent
ua741 Aug 29, 2023
b3114c7
Merge branch 'main' into independent
ua741 Aug 30, 2023
b252b3e
Merge branch 'main' into independent
ua741 Sep 1, 2023
159defd
Merge branch 'main' into independent
ua741 Sep 1, 2023
d4fdfd0
Merge branch 'main' into independent
ua741 Sep 6, 2023
f5737d7
Merge branch 'main' into independent
ua741 Sep 19, 2023
6f4f848
Merge branch 'main' into independent
ua741 Sep 27, 2023
fa2d960
Merge branch 'main' into independent
ua741 Sep 29, 2023
5acb195
Merge branch 'main' into independent
ua741 Oct 4, 2023
d6bc529
Merge branch 'main' into independent
ua741 Oct 19, 2023
12f61d8
Merge branch 'main' into independent
ua741 Nov 7, 2023
49126eb
Commit generated changes
ua741 Nov 7, 2023
419a72b
Merge branch 'main' into independent
ua741 Nov 10, 2023
01249c6
Merge branch 'main' into independent
ua741 Nov 16, 2023
b5eb62e
Merge branch 'main' into independent
ua741 Nov 18, 2023
b2e4dc0
Merge branch 'main' into independent
ua741 Nov 20, 2023
a81942b
Merge branch 'release_v0.8.3' into independent
ua741 Nov 28, 2023
08047d1
Merge branch 'main' into independent
ua741 Nov 28, 2023
f930b94
Merge branch 'main' into independent
ua741 Nov 30, 2023
aee247e
Merge branch 'main' into independent
ua741 Dec 4, 2023
c98d5e2
Merge branch 'main' into independent
vishnukvmd Dec 23, 2023
e09be34
v0.8.38
vishnukvmd Jan 17, 2024
67c693d
Merge branch 'main' into independent
vishnukvmd Jan 19, 2024
5fde3c5
Merge branch 'main' into independent
vishnukvmd Jan 25, 2024
c54e7a7
Merge branch 'main' into independent
vishnukvmd Jan 26, 2024
0c4d535
Merge branch 'main' into independent
vishnukvmd Feb 7, 2024
2588212
Merge branch 'main' into independent
vishnukvmd Feb 7, 2024
8b60d36
Merge branch 'main' into independent
vishnukvmd Feb 8, 2024
d161172
Merge branch 'main' into independent
vishnukvmd Feb 22, 2024
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
125 changes: 68 additions & 57 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,110 +1,121 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="io.ente.photos">
xmlns:tools="http://schemas.android.com/tools"
package="io.ente.photos">
<application android:name="${applicationName}"
android:label="@string/app_name"
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
android:allowBackup="false"
android:fullBackupContent="false"
android:largeHeap="true">
android:label="@string/app_name"
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
android:allowBackup="false"
android:fullBackupContent="false"
android:largeHeap="true">

<activity android:name=".MainActivity" android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:theme="@style/LaunchTheme"
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<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" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="ente"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="image/*"/>
<data android:mimeType="video/*"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<action android:name="android.intent.action.PICK"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="image/*"/>
<data android:mimeType="video/*"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
<action android:name="android.intent.action.GET_CONTENT"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.OPENABLE"/>
<data android:mimeType="image/*"/>
<data android:mimeType="video/*"/>
</intent-filter>

<!-- file provider to share files having a file:// URI -->

<!--Filter
to support sharing images into our app-->
<intent-filter android:label="@string/backup">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="image/*"/>
</intent-filter>

<intent-filter android:label="@string/backup">
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<action android:name="android.intent.action.SEND_MULTIPLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="image/*"/>
</intent-filter>

<intent-filter android:label="@string/backup">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="video/*"/>
</intent-filter>

<intent-filter android:label="@string/backup">
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
<action android:name="android.intent.action.SEND_MULTIPLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="video/*"/>
</intent-filter>

</activity>

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths"
tools:replace="android:resource"/>
</provider>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2" />
<meta-data android:name="flutterEmbedding" android:value="2"/>
<meta-data android:name="asset_statements"
android:resource="@string/asset_statements" />
android:resource="@string/asset_statements"/>
<meta-data android:name="io.sentry.dsn"
android:value="https://2235e5c99219488ea93da34b9ac1cb68@sentry.ente.io/4" />
android:value="https://2235e5c99219488ea93da34b9ac1cb68@sentry.ente.io/4"/>
<meta-data android:name="firebase_analytics_collection_deactivated"
android:value="true" />
android:value="true"/>
</application>

<!-- Android 11: https://developer.android.com/preview/privacy/package-visibility -->
<!-- https://developer.android.com/training/package-visibility/use-cases -->
<queries>
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="mailto" />
<action android:name="android.intent.action.SENDTO"/>
<data android:scheme="mailto"/>
</intent>
</queries>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MANAGE_MEDIA" />
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.MANAGE_MEDIA"/>
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION"/>
<uses-permission
android:name="android.permission.READ_MEDIA_IMAGES" /> <!-- If you want to read images-->
android:name="android.permission.READ_MEDIA_IMAGES"/> <!-- If you want to read images-->
<uses-permission
android:name="android.permission.READ_MEDIA_VIDEO" /> <!-- If you want to read videos-->
android:name="android.permission.READ_MEDIA_VIDEO"/> <!-- If you want to read videos-->
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29"
Expand Down
2 changes: 2 additions & 0 deletions lib/services/local/local_sync_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ Future<List<AssetPathEntity>> _getGalleryList({
);
}
filterOptionGroup.containsPathModified = containsModifiedPath;
// on Android, each media asset is already part of one folder. So, skip
// including all/Recent folder to reduce processing time.
final galleryList = await PhotoManager.getAssetPathList(
hasAll: !Platform.isAndroid,
type: RequestType.common,
Expand Down
2 changes: 2 additions & 0 deletions lib/services/location_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import "dart:io";
import "dart:math";

import "package:computer/computer.dart";
import "package:flutter/foundation.dart";
import "package:logging/logging.dart";
import "package:photos/core/constants.dart";
import "package:photos/core/event_bus.dart";
Expand Down Expand Up @@ -376,6 +377,7 @@ class GPSData {
if (Location.isValidLocation(result)) {
return result;
} else {
debugPrint("Invalid location ${result.toString()}");
return null;
}
}
Expand Down
16 changes: 15 additions & 1 deletion lib/ui/settings/app_update_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:open_file/open_file.dart';
import 'package:photos/core/configuration.dart';
import 'package:photos/core/network/network.dart';
import 'package:photos/ente_theme_data.dart';
Expand All @@ -8,6 +9,7 @@ import 'package:photos/services/update_service.dart';
import 'package:photos/theme/ente_theme.dart';
import "package:photos/ui/components/buttons/button_widget.dart";
import "package:photos/ui/components/models/button_type.dart";
import 'package:photos/utils/toast_util.dart';
import 'package:url_launcher/url_launcher_string.dart';

class AppUpdateDialog extends StatefulWidget {
Expand Down Expand Up @@ -148,10 +150,12 @@ class ApkDownloaderDialog extends StatefulWidget {
class _ApkDownloaderDialogState extends State<ApkDownloaderDialog> {
String? _saveUrl;
double? _downloadProgress;
late Logger _logger;

@override
void initState() {
super.initState();
_logger = Logger((_ApkDownloaderDialogState).toString());
_saveUrl = Configuration.instance.getTempDirectory() +
"ente-" +
widget.versionInfo!.name +
Expand Down Expand Up @@ -181,6 +185,16 @@ class _ApkDownloaderDialogState extends State<ApkDownloaderDialog> {
);
}

Future<void> openApk() async {
try {
final result = await OpenFile.open(_saveUrl);
_logger.info('Open APK $result');
} catch (e) {
showToast(context, "Failed to open file");
_logger.severe("Failed to open apk", e);
}
}

Future<void> _downloadApk() async {
try {
await NetworkClient.instance.getDio().download(
Expand All @@ -193,7 +207,7 @@ class _ApkDownloaderDialogState extends State<ApkDownloaderDialog> {
},
);
Navigator.of(context, rootNavigator: true).pop('dialog');
// OpenFile.open(_saveUrl);
await openApk();
} catch (e) {
Logger("ApkDownloader").severe(e);
final AlertDialog alert = AlertDialog(
Expand Down
Loading
Loading