HI.
If anyone has come across a similar problem and has any Idea as to what is going on in this simple app I would be very thankfull.
I have a simple app that scans barcodes that are url's to videos on my server which then plays them back through the video view.
It works perfectly on every phone I have tried it on which is about 8 different phones except the Google Nexus and the Experia ST26i.
Now here is the funny thing. I have another app that does the exact same thing only with a different layout and it works perfectly with these phones.
Also which makes it a nightmare to figure out is that it works in debug mode perfectly so I cant see anything in the logs and the only error message I get when running it in release mode is "Video cannot be played"
Here is the code if anyone can figure it out.
If anyone has come across a similar problem and has any Idea as to what is going on in this simple app I would be very thankfull.
I have a simple app that scans barcodes that are url's to videos on my server which then plays them back through the video view.
It works perfectly on every phone I have tried it on which is about 8 different phones except the Google Nexus and the Experia ST26i.
Now here is the funny thing. I have another app that does the exact same thing only with a different layout and it works perfectly with these phones.
Also which makes it a nightmare to figure out is that it works in debug mode perfectly so I cant see anything in the logs and the only error message I get when running it in release mode is "Video cannot be played"
Here is the code if anyone can figure it out.
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim mResult As String
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Button1 As Button
Dim myABBarcode As ABZxing
Dim Label1 As Label
Dim vv As VideoView
Dim ImageView2 As ImageView
Dim ImageView1 As ImageView
Dim ImageView3 As ImageView
Dim Label3 As Label
Dim Panel1 As Panel
End Sub
Sub vv_Complete
Log("Playing completed")
End Sub
Sub MenuItemSelect_Click
Dim MenuItem As String
MenuItem=Sender
Select MenuItem
Case "Poster Info"
Msgbox("To use this app you need to print our free poster at http://maralad.com/index.php/downloads/", "Gym Buddy")
End Select
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layGymBuddy")
Activity.AddMenuItem("Poster Info", "MenuItemSelect")
vv.Initialize("vv")
vv.SendToBack
Panel1.AddView(vv, 3%x, 0, 125%x, 115%y)
vv.Visible=False
ImageView2.BringToFront
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ImageView2_Click
myABBarcode.ABGetBarcode("myabbarcode", "")
End Sub
Sub myABBarcode_BarcodeFound (barCode As String, formatName As String)
mResult = barCode
ImageView1.Visible=False
ImageView3.Visible=False
vv.Visible= True
vv.LoadVideo("http",mResult)
vv.Play
Log (mResult)
End Sub
Sub myABBarcode_Canceled()
mResult = "Canceled"
Activity_Resume
End Sub