tsweet77 / intention-repeater-android

The Android Source for Intention Repeater Radionics
https://intentionrepeater.boards.net/
GNU General Public License v3.0
3 stars 2 forks source link

Update v1.52 (in development) to fix bugs. #3

Closed tsweet77 closed 1 month ago

tsweet77 commented 1 month ago

Thomas Sweet Re: Intention Repeater App Work Needed 9/11/2024

Intention Repeater v1.52 Needs:

  1. The Start button (and Stop, same button) when choosing a different language reverts to START and STOP when and after running, instead of the language.
  2. The Iterations label (below the Timer) needs to be in the foreign language that is chosen.
  3. Power Boost checkbox returns to English instead of staying in same language chosen.
  4. selectedFrequency dropdown reverts to English instead of chosen language when running or stopped after running.
  5. When not running and Reset is pressed, it shows English "0 Iterations (0 Hz)" instead of the language.
  6. When going Back from Settings Activity to MainActivity, the "0 Iterations (0 Hz)" should be in the selected language.
  7. When first run "Loading Intention..." should be in the language selected.
  8. I'd like "Hz", "kHz", "MHz", "GHz", "THz", "PHz", "EHz" to be translated into the chosen language as well.
  9. I'd like thousand (k), million (M), billion (B), trillion (T), quadrillion (q), quintillion (Q), sextillion (s), septillion (S) to be translated as well for iterations count.
  10. This work all takes place in MainActivity.kt

REVIEW THE PROGRAM AND MAKE ANY ADDITIONAL CHANGES NECESSARY TO FIX ISSUES.

The Shared Preferences is in AppPreferences for "Language" that stores the locale code (from the Settings.kt Activity): // Reload and apply the saved locale when the activity resumes val sharedPreferences = getSharedPreferences("AppPreferences", Context.MODE_PRIVATE) val savedLanguage = sharedPreferences.getString("Language", "en") ?: "en"

Getting the String Resource values (which will translate into different languages from the strings.xml files I've prepared. These need to be added to the code.

val hzText = stringResource(R.string.Hz) // Hz val khzText = stringResource(R.string.kHz) // kHz val mhzText = stringResource(R.string.MHz) // MHz val ghzText = stringResource(R.string.GHz) // GHz val thzText = stringResource(R.string.THz) // THz val phzText = stringResource(R.string.PHz) // PHz val ehzText = stringResource(R.string.EHz) // EHz

The function that calculates suffixes for frequency in Hz is: fun formatLargeFreq(value: Float): String in MainActivity.kt

val iterationsText = stringResource(R.string.Iterations) // "Iterations" text val kText = stringResource(R.string.k) // Abbreviation for Thousand val mText = stringResource(R.string.M) // Abbreviation for Million val bText = stringResource(R.string.B) // Abbreviation for Billion val tText = stringResource(R.string.T) // Abbreviation for Trillion val qText = stringResource(R.string.q) // Abbreviation for quadrillion val qUpperText = stringResource(R.string.Q) // Abbreviation for Quintillion val sText = stringResource(R.string.s) // Abbreviation for sextillion val sUpperText = stringResource(R.string.S) // Abbreviation for Septillion

The function that calculates suffixes for iterations is: fun formatLargeNumber(value: BigInteger): String in MainActivity.kt

NOTE: Make sure when using 7.83 Hz option, after 10 seconds it shows 78 or 79 Iterations, not 80 Iterations.

Note:

The reason that max frequency can get into THz range is because we're taking the intention, duplicating it till it's like 25MB (so potentially a million times) and that becomes a multiplier, how many times we duplicated the intention. So even if it really repeats in kHz range, you multiply by a million or so multiplier and get an equivalent THz speed.

String Resources:

Start Button Text: str_start Stop Button Text: str_stop "0 Iterations (0 Hz)" label: _0_iterations_0_hz Power Boost checkbox label: power_boost_uses_sha512_encoding Keep Device Awake checkbox label: keep_device_awake_3_hz_or_7_83_hz_only "Loading Intention..." label: loading_intention

selectedFrequency options: "7.83 Hz Schumann Resonance (Optimal)": _7_83_hz_schumann_resonance_optimal "3 Hz (Classic)": _3_hz_classic "Maximum Frequency": str_maximum_frequency

Sourcecode: https://github.com/tsweet77/intention-repeater-android

The strings.xml files hold the different languages per folder: app\src\main\res\values*\strings.xml

tsweet77 commented 1 month ago

Next up add a Duration input box in Settings.kt below the "Update Language" button. Save it to the Shared Preferences "AppPreferences" under "Duration". Default placeholder is "Seconds". Specify 0/Blank for Unlimited.

Have the MainActivity.kt check for Duration from shared preferences. When running if the elapsedTime in seconds == Duration then stop and change the Start Button back to green with label "START". Use the String Resource for multilocale.

tsweet77 commented 1 month ago

When finished running when duration is specified have notification show "Intention Repeater Finished" and show the timer and iterations. No need for frequency when done. Have the IterationsDisplay label show "Finished: " + iterations. No need for frequency displayed when done.

When stop is pressed it should not show frequency in the IterationsDisplay. Just "Finished: " + iterations.

tsweet77 commented 1 month ago

Be sure that ENABLED and DISABLED appear in the notification message in the right place in all languages used. Make sure to resize the text (and possibly buttons if needed) to best fit the foreign languages in them. Also may need to resize the text in the labels that are printed out.

Check all languages to make sure they all fit, and to see if there are any funky numbers in other languages and if they're appropriate.

tsweet77 commented 1 month ago

The project was updated to v1.53 satisfactorily.