<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Frank,<br>
<br>
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.<br>
<a class="moz-txt-link-freetext" href="https://invent.kde.org/network/kdeconnect-android/-/merge_requests/258">https://invent.kde.org/network/kdeconnect-android/-/merge_requests/258</a><br>
<br>
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.<br>
<br>
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.<br>
<br>
Thanks,<br>
Simon<br>
<br>
<div class="moz-cite-prefix">On 7/8/21 10:07 AM, Albert Vaca Cintora
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAAQViEsPtdOiXcW-vHjsdUtBy7JRN=2U4niYB75wTwW=WS8o4w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>Looks like a crash in phone number resolution? Not sure if
it is fixed in master already.<br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">---------- Forwarded
message ---------<br>
From: <strong class="gmail_sendername" dir="auto">Frank
Peacock</strong> <span dir="auto"><<a
href="mailto:fepeacock@gis4weather.com"
moz-do-not-send="true">fepeacock@gis4weather.com</a>></span><br>
Date: Thu, 8 Jul 2021, 14:48<br>
Subject: Android App Unable to Send SMS from Desktop - ADB
Debug Error Code Included<br>
To: <<a href="mailto:kdeconnect-owner@kde.org"
moz-do-not-send="true">kdeconnect-owner@kde.org</a>><br>
</div>
<br>
<br>
<div>
<p> </p>
<div lang="x-unicode">
<p><font face="Helvetica">Hello,</font></p>
<p><font face="Helvetica">I have recently started using
kdeconnect on my Linux Mint 19.3 desktop together
with an Android app (v 1.17.0).<br>
</font></p>
<p><font face="Helvetica">All works great using various
indicator software (not the latest). The one
functionality that fails is sending SMS's from the
desktop.</font></p>
<p><font face="Helvetica">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.<br>
</font></p>
<p><font face="Helvetica">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.</font></p>
<p><font face="Helvetica">Is it possible for your coders
of the Android app to catch this fault and still
allow sending of the SMS without a valid "</font><br>
<font face="Helvetica"><font face="Helvetica">LocalPhoneNumber.number"
variable value? <br>
</font></font></p>
<p><font face="Helvetica"><font face="Helvetica">Many
thanks,</font></font></p>
<p><font face="Helvetica"><font face="Helvetica">Frank
Peacock<br>
</font></font></p>
<p><font face="Helvetica"><font face="Helvetica">ADB
Debug Error on KDEConnect App v 1.17.0 when
sending SMS from desktop:<br>
</font></font></p>
<p><font face="Helvetica">07-08 17:44:21.672 9215 20050
E Sending message: Exception<br>
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<br>
07-08 17:44:21.672 9215 20050 E Sending message:
at
org.kde.kdeconnect.Plugins.SMSPlugin.SmsMmsUtils.sendMessage(SmsMmsUtils.java:158)<br>
07-08 17:44:21.672 9215 20050 E Sending message:
at
org.kde.kdeconnect.Plugins.SMSPlugin.SMSPlugin.onPacketReceived(SMSPlugin.java:413)<br>
07-08 17:44:21.672 9215 20050 E Sending message:
at
org.kde.kdeconnect.Device.onPacketReceived(Device.java:570)<br>
07-08 17:44:21.672 9215 20050 E Sending message:
at
org.kde.kdeconnect.Backends.BaseLink.packageReceived(BaseLink.java:70)<br>
07-08 17:44:21.672 9215 20050 E Sending message:
at
org.kde.kdeconnect.Backends.LanBackend.LanLink.receivedNetworkPacket(LanLink.java:249)<br>
07-08 17:44:21.672 9215 20050 E Sending message:
at
org.kde.kdeconnect.Backends.LanBackend.LanLink.lambda$reset$0(LanLink.java:97)<br>
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)<br>
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)<br>
07-08 17:44:21.672 9215 20050 E Sending message:
at java.lang.Thread.run(Thread.java:784)<br>
<br>
</font></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>