My code (whole app in fact) works on various devices (phones, tablet and Kindle fire). However, I just bought a Asus Transformer 10 inch Tablet (latest Android OS) . The same code in my app fails on this device only.
The problem is with loading images and the device fails only on the bold lines below. I don't understand this.
Also, how would I go about getting a log file etc. to find the error message? The app just stops and closes on the lines below. I am using the B4A bridge.
Sub LoadImages
If ImagesLoaded = Null OR ImagesLoaded <> "Load" Then
BmpPage1.InitializeSample(File.DirAssets, "AM_IMG_Page1.jpg",ImgPage1.Width,ImgPage1.Height)
BmpPage2.InitializeSample(File.DirAssets, "AM_IMG_Page2.jpg",ImgPage2.Width,ImgPage2.Height)
BmpPage3.InitializeSample(File.DirAssets, "AM_IMG_Page3.jpg",ImgPage3.Width,ImgPage3.Height)
BmpPage4.InitializeSample(File.DirAssets, "AM_IMG_Page4.jpg",ImgPage4.Width,ImgPage4.Height)
BmpGetLoan.InitializeSample(File.DirAssets, "AM_IMG_Loan.jpg",ImgGetLoan.Width,ImgGetLoan.Height)
BmpPayDebt.InitializeSample(File.DirAssets, "AM_IMG_Loan2.jpg",ImgPayDebt.Width,ImgPayDebt.Height)
BmpSetSail.InitializeSample(File.DirAssets, "AM_IMG_SetSail.jpg",ImgSetSail.Width,ImgSetSail.Height)
BmpBuyGun.InitializeSample(File.DirAssets, "AM_IMG_BuyGun.jpg",ImgBuyGun.Width,ImgBuyGun.Height)
BmpBuyItems.InitializeSample(File.DirAssets, "AM_IMG_BuyItems.jpg",ImgBuyItems.Width,ImgBuyItems.Height)
BmpGameHighLowCoins.InitializeSample(File.DirAssets, "coins3.jpg",ImgGameHighLowCoins.Width,ImgGameHighLowCoins.Height)
BmpGameWarCoins.InitializeSample(File.DirAssets, "coins3.jpg",ImgGameWarCoins.Width,ImgGameWarCoins.Height)
BmpStartUp.InitializeSample(File.DirAssets, "GMP_Splashscreen_T2.jpg",ImgStartUp.Width,ImgStartUp.Height)
If AppOrientation = "P" Then
End If
BmpPirateBattle.InitializeSample(File.DirAssets, "GMP_Splashscreen.jpg",ImgPirateBattle.Width,ImgPirateBattle.Height)
ImagesLoaded = "Load"
End If
ImgPage1.Bitmap = BmpPage1
ImgPage2.Bitmap = BmpPage2
ImgPage3.Bitmap = BmpPage3
ImgPage4.Bitmap = BmpPage4
ImgGetLoan.Bitmap = BmpGetLoan
ImgPayDebt.Bitmap = BmpPayDebt
ImgSetSail.Bitmap = BmpSetSail
ImgBuyGun.Bitmap = BmpBuyGun
ImgBuyItems.Bitmap = BmpBuyItems
ImgGameHighLowCoins.Bitmap = BmpGameHighLowCoins
ImgGameWarCoins.Bitmap = BmpGameWarCoins
ImgStartUp.Bitmap = BmpStartUp
If AppOrientation = "P" Then
ImgMapQuest.Bitmap = BmpMapQuest
End If
ImgPirateBattle.Bitmap = BmpPirateBattle
End Sub
The problem is with loading images and the device fails only on the bold lines below. I don't understand this.
Also, how would I go about getting a log file etc. to find the error message? The app just stops and closes on the lines below. I am using the B4A bridge.
Sub LoadImages
If ImagesLoaded = Null OR ImagesLoaded <> "Load" Then
BmpPage1.InitializeSample(File.DirAssets, "AM_IMG_Page1.jpg",ImgPage1.Width,ImgPage1.Height)
BmpPage2.InitializeSample(File.DirAssets, "AM_IMG_Page2.jpg",ImgPage2.Width,ImgPage2.Height)
BmpPage3.InitializeSample(File.DirAssets, "AM_IMG_Page3.jpg",ImgPage3.Width,ImgPage3.Height)
BmpPage4.InitializeSample(File.DirAssets, "AM_IMG_Page4.jpg",ImgPage4.Width,ImgPage4.Height)
BmpGetLoan.InitializeSample(File.DirAssets, "AM_IMG_Loan.jpg",ImgGetLoan.Width,ImgGetLoan.Height)
BmpPayDebt.InitializeSample(File.DirAssets, "AM_IMG_Loan2.jpg",ImgPayDebt.Width,ImgPayDebt.Height)
BmpSetSail.InitializeSample(File.DirAssets, "AM_IMG_SetSail.jpg",ImgSetSail.Width,ImgSetSail.Height)
BmpBuyGun.InitializeSample(File.DirAssets, "AM_IMG_BuyGun.jpg",ImgBuyGun.Width,ImgBuyGun.Height)
BmpBuyItems.InitializeSample(File.DirAssets, "AM_IMG_BuyItems.jpg",ImgBuyItems.Width,ImgBuyItems.Height)
BmpGameHighLowCoins.InitializeSample(File.DirAssets, "coins3.jpg",ImgGameHighLowCoins.Width,ImgGameHighLowCoins.Height)
BmpGameWarCoins.InitializeSample(File.DirAssets, "coins3.jpg",ImgGameWarCoins.Width,ImgGameWarCoins.Height)
BmpStartUp.InitializeSample(File.DirAssets, "GMP_Splashscreen_T2.jpg",ImgStartUp.Width,ImgStartUp.Height)
If AppOrientation = "P" Then
BmpMapQuest.InitializeSample(File.DirAssets, "AM_IMG_WorldMap.jpg",ImgMapQuest.Width,ImgMapQuest.Height) End If
BmpPirateBattle.InitializeSample(File.DirAssets, "GMP_Splashscreen.jpg",ImgPirateBattle.Width,ImgPirateBattle.Height)
ImagesLoaded = "Load"
End If
ImgPage1.Bitmap = BmpPage1
ImgPage2.Bitmap = BmpPage2
ImgPage3.Bitmap = BmpPage3
ImgPage4.Bitmap = BmpPage4
ImgGetLoan.Bitmap = BmpGetLoan
ImgPayDebt.Bitmap = BmpPayDebt
ImgSetSail.Bitmap = BmpSetSail
ImgBuyGun.Bitmap = BmpBuyGun
ImgBuyItems.Bitmap = BmpBuyItems
ImgGameHighLowCoins.Bitmap = BmpGameHighLowCoins
ImgGameWarCoins.Bitmap = BmpGameWarCoins
ImgStartUp.Bitmap = BmpStartUp
If AppOrientation = "P" Then
ImgMapQuest.Bitmap = BmpMapQuest
End If
ImgPirateBattle.Bitmap = BmpPirateBattle
End Sub
Last edited: