Fix: Update version info on settings page

Investigates and resolves the issue where the app version and build number were not updating correctly on the settings page.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-23 10:49:21 +00:00
parent 8168d4b645
commit d2d0493ffd
6 changed files with 128 additions and 28 deletions

View File

@@ -1,3 +1,4 @@
package com.lovable.zellyfinance;
import android.os.Build;
@@ -45,11 +46,12 @@ public class BuildInfoPlugin extends Plugin {
ret.put("packageName", packageName);
ret.put("androidVersion", Build.VERSION.RELEASE);
ret.put("androidSDK", Build.VERSION.SDK_INT);
ret.put("platform", "android");
// 현재 날짜를 디버깅 정보로 추가
ret.put("buildDate", new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new java.util.Date()));
Log.d(TAG, "빌드 정보 요청 성공 처리");
Log.d(TAG, "빌드 정보 요청 성공 처리: " + ret.toString());
call.resolve(ret);
} catch (Exception e) {
Log.e(TAG, "빌드 정보 가져오기 실패", e);
@@ -58,6 +60,7 @@ public class BuildInfoPlugin extends Plugin {
errorResult.put("versionCode", 1);
errorResult.put("buildNumber", 1);
errorResult.put("error", e.getMessage());
errorResult.put("platform", "android-error");
call.resolve(errorResult); // 에러가 발생해도 앱이 중단되지 않도록 resolve 호출
}
}