I'm just practicing trying to get the date tomorrow to display......
B4X:
Sub Globals
Dim Tomorrow As Long
Private lblDate As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Tomorrow")
Tomorrow = DateTime.Add(DateTime.Now, 0, 0, 1)
Log("Tomorrow’s date is: " & DateTime.Date(Tomorrow))
End Sub
Sub Date_Tomorrow
'?????
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
I changed the manifest from version 26 to 28...still no change. I notice that I don't have anything initiated. That's obviously a sign that something is lacking.
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Tomorrow")
Tomorrow = DateTime.Add(DateTime.Now, 0, 0, 1)
Log("Tomorrow’s date is: " & DateTime.Date(Tomorrow))
lblDate.Initialize("")
End Sub
Sub Date_Tomorrow
'?????
End Sub
Thanks Dey; that worked. Now I'm not sure what to initialize. I tried Activity.Initialize. Even my log won't show tomorrow's date. I'll try adding library: DateUtils and I'll check an Erel tutorial or two.
It's not the target sdk version that's the issue, it's the build version of the app. In your Main activity, right at the top is #Region Project Attributes. In there you have:
B4X:
#VersionCode:
#VersionName:
Make sure your #VersionCode is equal to or larger than the previous build, otherwise it will not install.
Thanks Guys,
I hope that's the general rule I was searching for. Now on my own (working for months) app I see 1 as the version code which works fine. The new experimental b4a projects have that field blank. I'll use 1 and not understand what that 1 means and see if it works....it did not work. After using 8.5 in that field I had the same error message. Finilly when I used 8 as the version code all went well with the compiling. If I click the field on the emulator the date and time disappear. I don't understand what it all means.
I tried 1,2,3,4,5,6 and 7 with no success but 8 worked. 8.5 and 8.50 did not work. My phone (S9) now works as well with the bridge. Playing around with the version I tried 9 and it worked. Then when trying 8 again it failed. Nine worked again and I see that apparently I must not go too high with the version number or can't reduce any future version code number below the highest ever used.
Thanks again Erel, Dr. Smith, Dey, and Geezer.
O.K., Now I see how to get the version code number back to a smaller number if desired; just rebuild it and, or I guess rename it since you said this numbering is pertaining to the same package name.
Ah.....all is well now.