android-change-log icon indicating copy to clipboard operation
android-change-log copied to clipboard

Use of string resource in manifest version name.

Open GoogleCodeExporter opened this issue 10 years ago • 10 comments

What steps will reproduce the problem?
1. Set versionName in manifest to a string resource.
2. Open application (for the first time).
3. The dialog should never open again, but it does and versionName is null.

What is the expected output? What do you see instead?

Dialog display once and only once.

What version of the product are you using? On what operating system?

android-change-log: 2.0.7 
OS: Linux Ubuntu 11.04
Android OS: Froyo 2.2
Device: Motorola Droid (Verizon CDMA)
Android build: FRG82D

Please provide any additional information below.

Perhaps there is a way to check how the version name is set, then get either 
the string or the string resource.

Original issue reported on code.google.com by [email protected] on 22 Jul 2011 at 4:11

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

oh, didn't get a reminder, that there is a new issue... I hadn't administered 
e-mail notification. 

Original comment by [email protected] on 3 Aug 2011 at 12:47

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

Original comment by [email protected] on 3 Aug 2011 at 12:48

  • Changed state: Accepted

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

Just tested and it works as expected. Opens first time, does not open next time.

AndroidManifest.xml:
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="sheetrock.panda.changelog"
        android:versionCode="4"
        android:versionName="@string/the_version">
strings.xml
    <string name="the_version">2.0.8</string>

Original comment by [email protected] on 15 Sep 2011 at 4:29

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

same problem.

<B>The ChangeLog open each time the application is launched.</B>

Everything else works as expected.

What version of the product are you using? On what operating system?

android-change-log: 2.1.1
Android OS: Eclair 2.1-update 1
Device: Garmin Asus A50
OS: Debian wheezy
Eclipse: Indigo

Sorry, right now have no time to explore 

Original comment by [email protected] on 7 Nov 2011 at 5:55

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

1. if you rooted your phone, you could try to find the prefs.xml-file and check 
if the version is written inside
2. use a debugger to check which values are in the fields of ChangeLog after 
instantiation.

Original comment by [email protected] on 12 Nov 2011 at 8:41

  • Changed state: Accepted

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

As a temporary workaround, you can use directly the value of your string 
resource to get versionName instead of calling getPackageInfo() method (see 
ChangeLog.java).

Replace line 69 :
this.thisVersion = 
context.getPackageManager().getPackageInfo(context.getPackageName(), 
0).versionName;
by
this.thisVersion = context.getString(R.string.name_of_your_version_string);

Original comment by [email protected] on 25 Nov 2011 at 8:59

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

What happened with this ticket? I can use the workaround, but what about Google 
Play and other stores that read the version name from the package?

Original comment by [email protected] on 11 Nov 2012 at 1:32

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

Never used my project in play store. Does it work with string resources? 

Original comment by [email protected] on 12 Nov 2012 at 12:25

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter

hello? anyone?

Original comment by [email protected] on 12 Jan 2013 at 5:24

GoogleCodeExporter avatar Apr 07 '15 04:04 GoogleCodeExporter