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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CHANGELOG

## [2.6.55] - 25.09.2026

**Improvements**

- The app no longer interrupts you with a full-screen update prompt on start. Google Play keeps
My Notes up to date on its own, following your Play Store settings.

**Fixes**

- A new rich note you open and leave without typing is discarded instead of showing up in the
list and statistics as an empty note.

## [2.6.54] - 05.09.2026

**New**
Expand Down
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply from: "$projectDir/gradle/libs-task.gradle"
apply from: "$projectDir/gradle/changelog-task.gradle"


def appVersionCode = 54
def appVersionCode = 55
def appVersionName = "2.6.${appVersionCode}"

def gitCommitHashProvider = providers.exec {
Expand Down Expand Up @@ -199,7 +199,6 @@ dependencies {
annotationProcessor "androidx.room:room-compiler:$roomVersion"

//Pay Billing
implementation 'com.google.android.play:app-update:2.1.0'
implementation 'com.android.billingclient:billing:8.3.0'

//Other lib (Gson/PhotoView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,30 @@

import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import androidx.activity.result.ActivityResultLauncher;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.play.core.appupdate.AppUpdateInfo;
import com.google.android.play.core.appupdate.AppUpdateManager;
import com.google.android.play.core.appupdate.AppUpdateManagerFactory;
import com.google.android.play.core.install.model.AppUpdateType;
import com.google.android.play.core.install.model.UpdateAvailability;
import com.pasich.mynotes.ui.view.activity.ChangelogActivity;
import com.pasich.mynotes.ui.view.dialogs.UpdateChangelogDialog;
import com.pasich.mynotes.utils.UpdateChecker;

/** Handles in-app update checks and changelog display. */
/**
* Shows what changed after the app was updated. It never asks the user to update: Google Play
* updates the app on its own, and a blocking update screen on every launch drove users away.
*/
public class AppUpdateController {

private static final int REQUEST_UPDATE = 100;

private final Activity activity;
private final UpdateChecker updateChecker;
private final ActivityResultLauncher<Intent> changelogLauncher;

private AppUpdateManager updateManager;

public AppUpdateController(
Activity activity,
UpdateChecker updateChecker,
ActivityResultLauncher<Intent> changelogLauncher) {
this.activity = activity;
this.updateChecker = updateChecker;
this.changelogLauncher = changelogLauncher;

init();
}

private void init() {
updateManager = AppUpdateManagerFactory.create(activity);
updateChecker.initializeVersionCheck();
checkForUpdate();
}

/** Resumes an in-progress immediate update flow if one was started. */
public void handleOnResume() {
updateManager
.getAppUpdateInfo()
.addOnSuccessListener(
info -> {
if (info.updateAvailability()
== UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) {
startImmediateUpdate(info);
}
});
}

private void checkForUpdate() {
updateManager
.getAppUpdateInfo()
.addOnSuccessListener(
info -> {
if (info.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE
&& info.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)) {

startImmediateUpdate(info);
}
})
.addOnFailureListener(e -> Log.d("AppUpdate", "check error: " + e.getMessage()));
}

private void startImmediateUpdate(AppUpdateInfo info) {
try {
updateManager.startUpdateFlowForResult(
info, AppUpdateType.IMMEDIATE, activity, REQUEST_UPDATE);
} catch (Exception e) {
Log.d("AppUpdate", "startUpdate error: " + e.getMessage());
}
}

/** Shows the changelog dialog if a new app version was detected. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@ protected void onNewIntent(@NonNull Intent intent) {
navigationController.handleShortcuts(intent);
}

@Override
protected void onResume() {
super.onResume();
appUpdateController.handleOnResume();
}

@Override
public void startDeleteTagDialog(Tag tag) {
new DeleteTagDialog(tag).show(getSupportFragmentManager(), "deleteTag");
Expand Down
Loading