Android Question Error only at Moto G

Discussion in 'Android Questions' started by yiankos1, Apr 28, 2015.

  1. yiankos1

    yiankos1 Active Member Licensed User

    Hello my friends, i have a little question about an error comes only at Motorola Moto G and i don't know why because i don't own a Moto G and i can't debug it. Here is a printscreen of that error. Can you describe me what does it mean and were do i have to look at my code.
    Thank you in advance!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you post the code in preview_activity_create sub?
     
    yiankos1 likes this.
  3. yiankos1

    yiankos1 Active Member Licensed User

    Code:
    Sub Activity_Create(FirstTime As Boolean)

    'Set screen brightness max
        Private pi As Phone
        pi.SetScreenBrightness(
    1)

    'Set the correct layout landscape-portrait
        If 100%y > 100%x  Then
            
    Activity.LoadLayout("Preview")
        
    Else
            
    Activity.LoadLayout("previewLandscape")
        
    End If
       
    'Get if user is lisenced in order to show ads
        If Info.licensed=False Then
            adInt.Initialize(
    "mwadi","ca-app-pub-49399549238*****/868696****")
            adInt.LoadAd
        
    End If

    'Set the correct rotation of the taken photo from camera    
        Dim exif As ExifData
        exif.Initialize(Main.dir,Main.filename)
        
    Log(exif.getAttribute(exif.TAG_ORIENTATION))
        
    If exif.getAttribute(exif.TAG_ORIENTATION) = 1 Then
            
    Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),0,1)
        
    Else If exif.getAttribute(exif.TAG_ORIENTATION) = 3 Then
               
    Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),180,2)
        
    Else If exif.getAttribute(exif.TAG_ORIENTATION) = 6 Then
               
    Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),90,3)
        
    Else If exif.getAttribute(exif.TAG_ORIENTATION) = 8 Then
               
    Dim newImage As Bitmap = RotateImage(LoadBitmap(Main.dir,Main.filename),-90,3)
        
    End If

    'Set to saveImage the taken photo
        saveImage=newImage
       
    'Put the taken photo to panel
        pnlPhoto.SetBackgroundImage(newImage)
       
    'Dim the share photo BitmapDrawable(library - button with icon)
        Dim bm As BitmapDrawable
        bm.Initialize(
    LoadBitmap(File.DirAssets,"ic_action_share.png"))
        btnShare.BackgroundColor=
    Colors.ARGB(200,30,144,255)
        btnShare.TextColor=
    Colors.White
        btnShare.Text=
    "Share"
        
    'btnShare.IconPadding=0
        btnShare.setIcon(True,bm)

    'Dim the save photo BitmapDrawable(library - button with icon)   
        Dim bm As BitmapDrawable
        bm.Initialize(
    LoadBitmap(File.DirAssets,"ic_action_download.png"))   
        btnSave.BackgroundColor=
    Colors.ARGB(200,0,128,0)
        btnSave.TextColor=
    Colors.White
        btnSave.Text=
    "Save"
        
    'btnSave.IconPadding=0
        btnSave.setIcon(True,bm)

    'Dim the delete photo BitmapDrawable(library - button with icon)   
        Dim bm As BitmapDrawable
        bm.Initialize(
    LoadBitmap(File.DirAssets,"ic_action_cancel.png"))
        btnDelete.TextColor=
    Colors.White
        btnDelete.BackgroundColor=
    Colors.ARGB(200,255,0,0)
        btnDelete.Text=
    "Delete"
        
    'btnDelete.IconPadding=0
        btnDelete.setIcon(True,bm)
        
    ProgressDialogHide
       
    End Sub
     
  4. Peter Simpson

    Peter Simpson Expert Licensed User

    That's Activity_Create @yiankos1 and not preview_activity_create as requested by Erel...
     
    yiankos1 and thedesolatesoul like this.
  5. yiankos1

    yiankos1 Active Member Licensed User

    Hello, thank you very much describing to me what erel needs, but I sent you the Activity_Create sub of Preview activity and I am sure that there is no Preview_Activity_Create in my code. I think that I miss something from your request but I can't figure it out, can you explain to me? Thank you for your time.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I see. The device fails to load one of the images. You can use a Try / Catch block to catch this error.
     
    yiankos1 likes this.
  7. yiankos1

    yiankos1 Active Member Licensed User

    Thank you very much for your time Erel. I will give it a "try". Have a nice day!
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice