Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add haptic feedback when swiping between verses #34

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shubhamnanche
Copy link
Contributor

PR Changes:

  1. Added support for haptic feedback while moving between verses using left/right swipe gestures.
  2. Added version catalogs for gradle dependencies.
  3. Migrated code to support API 35 (Android 15).
  4. Optimised code for performance using throttling.
  5. Upgraded Android Gradle Plugin to version 8.7.3, improving stability and supporting the latest Android versions.
  6. Migrated BuildConfigs to Gradle Build Files, as it is deprecated in AGP 8.0 and is scheduled to be removed in AGP 9.0.

@WirelessAlien
Copy link
Owner

Did you try the release version? It has a few progaurd issues - one runtime exception (the gson lib need to update to 2.11.0, that will fix it, maybe), a few class cast exception ( I don't know why are these happening, need to look throughly). Try the release build, you will find it.

@shubhamnanche
Copy link
Contributor Author

release {
minifyEnabled true
}

I had enabled this property in the release build, to keep only the necessary code in the release build variant. Earlier that property was false which could've potentially included unnecessary code in the release variant thereby slowing down the performance of the app.

https://stackoverflow.com/a/78813088/16439619

Now, as per your suggestion, I updated gson lib to 2.11.0 and still there are issues while launching on device, although there are no issues in compiling. Let me raise an updated PR after fixing these issues.

@shubhamnanche
Copy link
Contributor Author

I was able to fix the issue. Actually, since you never used minifyEnabled=true before, your app size was ~17MB on app launch after installation. Now that I had enabled obfuscation, the app size was reduced to ~9MB at runtime (~8MB saved 😉). But, this resulted in a possible erasure of method signatures and class types/members for model classes in the release built due to the proguard rules.

I was able to preserve the types during compile time (which also fixed the runtime crash) using-

-keep class com.wirelessalien.android.bhagavadgita.data.** {
    !transient <fields>;
}

As a result, now the release build variant is both lightweight and performant. Let me know if you find any issues, although I have tested it from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants