Skip to content

Commit

Permalink
NEW Show name of install store in about
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 27, 2024
1 parent a12a71a commit b88784c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
22 changes: 16 additions & 6 deletions app/src/main/java/com/nltechno/dolidroidpro/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public class AboutActivity extends Activity {

static final int RESULT_ABOUT = RESULT_FIRST_USER;

private String nameOfSourceStore = "Unknown";

/**
* Called when activity is created
*/
Expand All @@ -70,7 +72,7 @@ public void onCreate(Bundle savedInstanceState) {
Log.i(LOG_TAG, "onCreate savedInstanceState="+savedInstanceState);
super.onCreate(savedInstanceState);

SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
boolean prefAlwaysShowBar = sharedPrefs.getBoolean("prefAlwaysShowBar", true);
boolean prefAlwaysAutoFill = sharedPrefs.getBoolean("prefAlwaysAutoFill", true);
Log.d(LOG_TAG, "prefAlwaysShowBar="+prefAlwaysShowBar+" prefAlwaysAutoFill="+prefAlwaysAutoFill);
Expand Down Expand Up @@ -139,25 +141,33 @@ public void onStart() {
{
PackageInfo info = manager.getPackageInfo(this.getPackageName(), 0);

sVersion+="<b>"+info.versionName+" (build "+info.versionCode+")</b>";
String installerPackageName = manager.getInstallerPackageName(this.getPackageName());
if ("com.android.vending".equals(installerPackageName)) {
nameOfSourceStore = "Android PlayStore";
} else if (installerPackageName != null) {
nameOfSourceStore = installerPackageName;
}

s1+=getString(R.string.VersionStaticResources)+": <b>"+SecondActivity.VERSION_RESOURCES+"</b><br />\n";
sVersion+="<b>"+info.versionName+" (build "+info.versionCode+")</b>";

//s+= "PackageName = " + info.packageName + "\n";
s1+=getString(R.string.Author)+": <span style=\"color:#008888\"><a href=\"https://www.github.com/eldy\">Laurent Destailleur</a></span><br />\n";
s1+=getString(R.string.Web)+": <span style=\"color:#008888\"><a href=\"https://www.dolicloud.com?origin=dolidroid&amp;utm_source=dolidroid&amp;utm_campaign=none&amp;utm_medium=mobile\">https://www.dolicloud.com</a></span><br />\n";
s1+=getString(R.string.Compatibility)+": <b>Dolibarr 8+</b><br />\n";
s1+=getString(R.string.Sources)+": <span style=\"color:#008888\"><a href=\"https://github.com/DoliCloud/DoliDroid.git\">https://github.com/DoliCloud/DoliDroid.git</a></span><br />\n";
s1+=getString(R.string.License)+": <b>GPL v3+</b><br />\n";
//s1+=getString(R.string.Sources)+": https://www.nltechno.com/services/<br />\n";
s1+=getString(R.string.Sources)+": <span style=\"color:#008888\"><a href=\"https://github.com/DoliCloud/DoliDroid.git\">https://github.com/DoliCloud/DoliDroid.git</a></span><br />\n";
s1+=getString(R.string.Author)+": <span style=\"color:#008888\"><a href=\"https://www.github.com/eldy\">Laurent Destailleur</a>, ...</span><br />\n";
s1+=getString(R.string.PrivacyPolicy)+": <span style=\"color:#008888\"><a href=\"https://www.dolicloud.com/en-dolidroid-privacy-policy.php\">https://www.dolicloud.com/en-dolidroid-privacy-policy.php</a></span><br />\n";
// This download key allow to download file with name src_dolidroid-info.versionName-downloadkey
//String downloadkey=Utils.MD5Hex("dolidroid"+info.versionName.replaceAll("[^0-9.]", "")+"saltnltechno").substring(0, 8);
//s1+=getString(R.string.Sources)+" Download Key: dolidroid-"+info.versionName.replaceAll("[^0-9.]", "")+"-"+downloadkey+"<br />\n";
s1+=getString(R.string.VersionStaticResources)+": <b>"+SecondActivity.VERSION_RESOURCES+"</b><br />\n";
s1+=getString(R.string.Compatibility)+": <b>Dolibarr 8+</b><br />\n";


s1+="<br />\n";

s1+=getString(R.string.DeviceAPILevel)+": <b>"+Build.VERSION.SDK_INT+"</b><br />\n";
s1+=getString(R.string.NameOfSourceStore)+": <b>"+nameOfSourceStore+"</b><br />\n";
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
Expand Down
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 @@ -38,6 +38,7 @@
<string name="Web">Web</string>
<string name="Compatibility">Compatibility</string>
<string name="License">License</string>
<string name="NameOfSourceStore">Source store of installation</string>
<string name="Sources">Sources</string>
<string name="PrivacyPolicy">Privacy Policy</string>
<string name="DeviceAPILevel">Device API Level</string>
Expand Down

0 comments on commit b88784c

Please sign in to comment.