Skip to content

Commit

Permalink
OpenAI billing changes info
Browse files Browse the repository at this point in the history
  • Loading branch information
DevEmperor committed Mar 2, 2024
1 parent 1d12f3f commit 7ec62a0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.devemperor.wristassist.activities;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
Expand All @@ -18,6 +19,7 @@ public class ChangelogActivity extends AppCompatActivity {

ScrollView changelogSv;
TextView changelogTv;
int lastVersionCode;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -31,8 +33,9 @@ protected void onCreate(Bundle savedInstanceState) {
Markwon markwon = Markwon.builder(this).usePlugin(HtmlPlugin.create()).build();
String md = getString(R.string.changelog_md);
int versionCode = BuildConfig.VERSION_CODE;
int lastVersionCode = sp.getInt("net.devemperor.wristassist.last_version_code", 0);
lastVersionCode = sp.getInt("net.devemperor.wristassist.last_version_code", 0);

if (lastVersionCode < 27) md = md.concat(getString(R.string.changelog_md_27));
if (lastVersionCode < 26) md = md.concat(getString(R.string.changelog_md_26));
if (lastVersionCode < 25) md = md.concat(getString(R.string.changelog_md_25));
if (lastVersionCode < 24) {
Expand All @@ -57,6 +60,11 @@ protected void onCreate(Bundle savedInstanceState) {
}

public void okay(View view) {
if (lastVersionCode < 27) {
Intent intent = new Intent(this, QRCodeActivity.class);
intent.putExtra("net.devemperor.wristassist.image_url", "https://platform.openai.com/account/billing/overview");
startActivity(intent);
}
finish();
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@
<string name="wristassist_image_request_rejected">Die Anfrage wurde abgelehnt. Deine Anfrage enthält möglicherweise Text, der nicht erlaubt ist.</string>
<string name="changelog_md_26">### Version 3.0.0 \n#### Bilder KI (DALL-E) hinzugefügt \nDu kannst nun mit OpenAI\'s Dall-E Bilder generieren, speichern und über einen QR-Code teilen. In den Einstellungen kannst du zwischen verschiedenen Modellen, Qualitäten und Größen wechseln. \n#### Mehrere Fehlerbehebungen und Design Änderungen \n</string>
<string name="wristassist_saving">Speichert …</string>
<string name="changelog_md_27">### Version 3.0.1 \n#### Wichtiger Hinweis: Änderungen an der OpenAI-API-Abrechnung \nOpenAI aktualisiert die Art und Weise, wie dein OpenAI-API-Konto ab **8. März 2024** abgerechnet wird. Anstatt eine Rechnung am Ende des Monats zu erhalten, musst du **Guthaben im Voraus erwerben**, um die API zu nutzen. <u>Klicke einfach auf die Schaltfläche "OK", um Guthaben zu deinem Konto hinzuzufügen.</u> Andernfalls werden API-Anfragen für WristAssist vorübergehend fehlschlagen, bis Guthaben erworben wird. \n</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,5 @@
<string name="wristassist_image_request_rejected">The request was rejected. Your prompt may contain text that is not allowed.</string>
<string name="changelog_md_26">### Version 3.0.0 \n#### Added image AI (DALL-E) \nYou can now use OpenAI\'s Dall-E to generate, save and share images via a QR code. You can switch between different models, qualities and sizes in the settings. \n#### Several bugfixes and design changes \n</string>
<string name="wristassist_saving">Saving …</string>
<string name="changelog_md_27">### Version 3.0.1 \n#### Important notice: Changes to your OpenAI API billing \nOpenAI is updating how they bill for your OpenAI API account starting **March 8, 2024**. Instead of receiving a bill at the end of the month, you will need to **pre-purchase credits** to use the API. <u>Just click the okay button to add credits to your account.</u> Otherwise, API requests will temporarily fail for WristAssist until credits are purchased. \n</string>
</resources>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '8.2.2' apply false
id 'com.android.application' version '8.3.0' apply false
id 'com.android.library' version '8.3.0' apply false

// Add the dependency for the Google services Gradle plugin
id 'com.google.gms.google-services' version '4.4.0' apply false
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Mar 07 08:30:12 CET 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 7ec62a0

Please sign in to comment.