Fwd: Android App Unable to Send SMS from Desktop - ADB Debug Error Code Included

Simon Redman simon at ergotech.com
Sat Jul 10 21:59:25 BST 2021


Hi Frank,

Thanks for reporting this. I have created this MR which should fix the 
issue. It works as far as I'm able to reproduce, anyway.
https://invent.kde.org/network/kdeconnect-android/-/merge_requests/258

For what it's worth, the basic situation you've described below with 
respect to a SIM card not knowing its own number is the same for all 
carriers. However, sometimes the phone will remember/know its own number 
and other times not. I don't know when or why this happens. The 
(Android) documentation is very unclear.

The most-correct thing we could do is have the app query for the user's 
phone number. I do not have time to work on this, but someone else 
reading (maybe you!) could take this as a somewhat-simple first project. 
The biggest challenge is designing a good UI for this; a user might have 
an arbitrary number of SIM cards, some of which may not be inserted at 
any given moment, and some of which might "know" their own numbers and 
others might not.

Thanks,
Simon

On 7/8/21 10:07 AM, Albert Vaca Cintora wrote:
> Looks like a crash in phone number resolution? Not sure if it is fixed 
> in master already.
>
> ---------- Forwarded message ---------
> From: *Frank Peacock* <fepeacock at gis4weather.com 
> <mailto:fepeacock at gis4weather.com>>
> Date: Thu, 8 Jul 2021, 14:48
> Subject: Android App Unable to Send SMS from Desktop - ADB Debug Error 
> Code Included
> To: <kdeconnect-owner at kde.org <mailto:kdeconnect-owner at kde.org>>
>
>
> Hello,
>
> I have recently started using kdeconnect on my Linux Mint 19.3 desktop 
> together with an Android app (v 1.17.0).
>
> All works great using various indicator software (not the latest). The 
> one functionality that fails is sending SMS's from the desktop.
>
> I have using adb to debug the kdeconnect messages on my phone, when I 
> try to send an SMS from the desktop, and the error below my email 
> appears. The error also occurs on older Android app versions too.
>
> I have followed the lines indicated in the error message below in the 
> Android app source code and I think I am having the problem because of 
> my SIM card having an unknown number. The reason I cannot set the 
> phone number is that the SIM does not allow storing it and the carrier 
> stores my line number on their central system rather.
>
> Is it possible for your coders of the Android app to catch this fault 
> and still allow sending of the SMS without a valid "
> LocalPhoneNumber.number" variable value?
>
> Many thanks,
>
> Frank Peacock
>
> ADB Debug Error on KDEConnect App v 1.17.0 when sending SMS from desktop:
>
> 07-08 17:44:21.672  9215 20050 E Sending message: Exception
> 07-08 17:44:21.672  9215 20050 E Sending message: 
> java.lang.NullPointerException: Attempt to read from field 
> 'java.lang.String 
> org.kde.kdeconnect.Helpers.TelephonyHelper$LocalPhoneNumber.number' on 
> a null object reference
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Plugins.SMSPlugin.SmsMmsUtils.sendMessage(SmsMmsUtils.java:158)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Plugins.SMSPlugin.SMSPlugin.onPacketReceived(SMSPlugin.java:413)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Device.onPacketReceived(Device.java:570)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Backends.BaseLink.packageReceived(BaseLink.java:70)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Backends.LanBackend.LanLink.receivedNetworkPacket(LanLink.java:249)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Backends.LanBackend.LanLink.lambda$reset$0(LanLink.java:97)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Backends.LanBackend.LanLink.lambda$reset$0$LanLink(Unknown 
> Source:0)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> org.kde.kdeconnect.Backends.LanBackend.-$$Lambda$LanLink$u8LWlVA_uGoxlkxdXMbWulE13kY.run(Unknown 
> Source:4)
> 07-08 17:44:21.672  9215 20050 E Sending message:     at 
> java.lang.Thread.run(Thread.java:784)
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20210710/a2a7e269/attachment.htm>


More information about the KDEConnect mailing list