Android Question No data access with release.

Vbxler

Member
Licensed User
Longtime User
I have created an application where I read data from a MySQL database. Access to the database is working under debug mode, but not under release mode.
The Library mySQL I use so:
B4X:
'Connecting to database
DB.setDatabase("mysql_Server","DB_Name","user","Passwort")
'Query the data
Liste = DB.Query("select DATE_TIME, CPU_STATUS from TBL_MESSWERT;")

If Liste.IsInitialized=False Then
    Msgbox("No data access!","Warnung")
Else
   'Here the data are evaluated
End If
But it will always output the Msgbbox under Release and Debug (Rapid) it works. Has one of you a an idea what could be wrong?

I use BVA version 5.20, phone with Android 4.2.2, Java 8.0.600.26
Thanks for any help!
 

DonManfred

Expert
Licensed User
Longtime User
have you set internet permission?
 
Upvote 0

Vbxler

Member
Licensed User
Longtime User
Thanks for the hint!
It works now, I have added the first two lines:
B4X:
AddManifestText(
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
Is that correct?
 
Upvote 0

Vbxler

Member
Licensed User
Longtime User
So it should probably be right:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
'End of default text.

AddPermission(android.permission.INTERNET)
Have the Manifest Editor never used, Thanks for the help!
 
Upvote 0
Top