1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-28 19:45:50 +01:00

For Bangle.js app remove the Donation link (Google Play Store policy) and add text in the About dialog urging users to donate via the homepage.

This commit is contained in:
Gordon Williams 2022-05-25 13:26:50 +01:00
parent 961cdd437f
commit 5107887bec
2 changed files with 10 additions and 2 deletions

View File

@ -41,6 +41,7 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.view.menu.MenuItemImpl;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationManagerCompat;
@ -167,6 +168,13 @@ public class ControlCenterv2 extends AppCompatActivity
drawer.setDrawerListener(toggle);
toggle.syncState();
/* This sucks but for the play store we're not allowed a donation link. Instead for
the Bangle.js Play Store app we put a message in the About dialog via @string/about_description */
if (BuildConfig.FLAVOR == "banglejs") {
MenuItemImpl v = (MenuItemImpl) ((NavigationView) drawer.getChildAt(1)).getMenu().findItem(R.id.donation_link);
if (v != null) v.setVisible(false);
}
NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);

View File

@ -9,13 +9,13 @@
<string name="application_name_banglejs_main">Bangle.js Gadgetbridge</string>
<string name="title_activity_controlcenter_banglejs_main">Bangle.js Gadgetbridge</string>
<string name="about_activity_title_banglejs_main">About Bangle.js Gadgetbridge</string>
<string name="about_description_banglejs_main">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.</string>
<string name="about_description_banglejs_main">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.\n\nDue to Google Play Store policies, we are not allowed a donation link in the app itself, but if you like this app please consider donating via the Gadgetbridge homepage below.</string>
<string name="gadgetbridge_running_banglejs_main">Bangle.js running</string>
<string name="application_name_banglejs_nopebble">Bangle.js Gadgetbridge</string>
<string name="title_activity_controlcenter_banglejs_nopebble">Bangle.js Gadgetbridge</string>
<string name="about_activity_title_banglejs_nopebble">About Bangle.js Gadgetbridge</string>
<string name="about_description_banglejs_nopebble">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.</string>
<string name="about_description_banglejs_nopebble">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.\n\nDue to Google Play Store policies, we are not allowed a donation link in the app itself, but if you like this app please consider donating via the Gadgetbridge homepage below.</string>
<string name="gadgetbridge_running_banglejs_nopebble">Bangle.js running</string>
<string name="application_name_main_nightly">Gadgetbridge (Nightly)</string>