Android Question InAppBilling Library java.lang.nullpointerexeption

nobbi59

Active Member
Licensed User
Longtime User
Hi guys,

While debuuging my app I get the error code: java.lang.nullpointerexpetion

B4X:
Sub listedown_DownloadCompleted(ServerPath As String, Success As Boolean)
    t1 = File.ReadString(File.DirDefaultExternal, "email.txt")
    liste = File.ReadString(File.DirDefaultExternal, "liste.txt")
    If liste.Contains(t1) Then
      Msgbox("Die EMail Adresse wird bereits verwendet.", "Error")
      StartActivity(reg1)
    Else
      File.WriteString(File.DirDefaultExternal, "name.txt", name.Text)
      datum = DateTime.Date(DateTime.Now)
      File.WriteString(File.DirDefaultExternal, "regdate.txt", datum)
      If produkt = "3" Then
          billing.Manager.RequestPayment(Activity, "3monate", " ")
      End If
      If produkt = "6" Then
          billing.Manager.RequestPayment(Activity, "6monate", " ")
      End If
      If produkt = "12" Then
          billing.Manager.RequestPayment(Activity, "12monate", " ")
      End If
    End If

I dont know whats wrong with this code :(
 

CSP

Member
Licensed User
Longtime User
I know this question is a little old but this may help with large projects and slight oversight...

Be sure this is in sub Activity_Create

If FirstTime Then
manager.Initialize("manager", key)
End If

I had commented it out while testing =)
 
Upvote 0
Top