Closed GoogleCodeExporter closed 8 years ago
please read the faq section for this topic.
I found two guys helping to implement a full featured sms client with websms
connection. but it will take time.
Original comment by f...@ub0r.de
on 9 Nov 2013 at 9:55
My plan is to show status and progress of the development of a fully featured
SMS app including websms connectivity in this issue.
There are several things to do. Some of these topics can be done separately
quite nicely:
1. DONE: migrate websms, websms-api and smsdroid to android-stuidio + gradle
2. move smsdroid's code into the websms project, to enable the websms app to
read messages
3. make smsdroid/websms a full featured sms app
a. save new incoming sms into the sms database
b. handle mms
4. refactor websms' connector connectivity. move the code out of the composer
activity into some sort of service which can be used from all over the app
6. optional: refactor all the old code. it's 5 years old and was written vor
API3 aka android-1.5 donut. most of it can be done much more nicely.
I think 1,3,4 can be done by different people at any time in any order.
Just post here, if you want to start with something of it. Fork my github repos
and do it in a new topic branch.
I'll merge it into the websms master as soon as it makes sense.
Original comment by f...@ub0r.de
on 11 Nov 2013 at 4:33
I understand the problem.
Wouldn't it be possible - as an intermediate solution - to keep smsdroid and
websms seperated, but to implement some callbacks (intents?) in smsdroid which
websms can use to store the sent SMS? This way smsdroid would be the master sms
app which calls websms to send the SMS, which would in return callback smsdroid
to let it store the sent SMS.
I am not familiar with Android development but I think (from what I remember of
the 2.x API documentation which I browsed some time ago) it is possible to
define and call custom intents which could be used for something like that?
What do you think?
Original comment by dam...@googlemail.com
on 14 Nov 2013 at 7:35
After updating to Kitkat on my Nexus 4, SMSDroid is still working, but with a
serious caveat: It can neither delete new messages nor mark them read. Every
time I try, I just get a new notification for the "new" SMS
Original comment by holger.c...@theshiar.net
on 28 Nov 2013 at 7:57
Issue 817 has been merged into this issue.
Original comment by f...@ub0r.de
on 30 Nov 2013 at 2:15
@holger: it's because android 4.4 allows only one sms app to write into the sms
database. that's why smsdroid was marked as incompatible and websms was changed
to not save sent messages into the database.
Original comment by f...@ub0r.de
on 30 Nov 2013 at 2:16
For anyone having issues with this, it would be worth staring the following
Android enhancement request, which if implemented would make it easier to get
SMSDroid & WebSMS working on Kitkat.
https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec
=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=61684
Original comment by mark.che...@googlemail.com
on 8 Dec 2013 at 2:06
There is a workaround available for WebSMS at least as follows:
1. Install a version of WebSMS prior to 4.7.1 (An APK for 4.3 is available at
http://code.google.com/p/websmsdroid/)
2. Install App Ops Starter from Google Play and open it
3. Go to the Messaging tab, find WebSMS and tap on it
4. Turn on the "Write SMS/MMS" option
Felix is aware of the workaround. The logic that prevents messages being
written to the database with Kitkat needs to be modified to enable it to work
on the latest version.
In principle this should also work with SMSDroid. No guarantee that it will
continue to be available for future Android versions, but it does provide an
interim solution at least.
Original comment by mark.che...@googlemail.com
on 9 Dec 2013 at 12:47
App Ops Starter is not currently working with 4.4.2, though the setting update
appears to have survived the upgrade.
Original comment by mark.che...@googlemail.com
on 9 Dec 2013 at 11:16
The upgrade to Kitkat v4.4.2 also appears to have broken the Chooser mechanism
in SMSDroid when sending messages as it only now offers the default messaging
app, i.e. Hangouts for most people.
Original comment by mark.che...@googlemail.com
on 10 Dec 2013 at 3:20
The workaround works flawless on 4.4 with WebSMS.
Thanks a lot for this Mark.
Original comment by andre.ve...@gmail.com
on 11 Dec 2013 at 2:08
Be aware that App Ops is still not available to non-root users on 4.4.2 and
there doesn't appear to be an obvious solution to this currently.
Consequently it is best to apply the work-around above before upgrading as the
permissions update does survive the Android upgrade.
Devices with 4.4.2 which have been rooted (or if willing to root the device in
order to get this working) can still run App Ops X, installed via AppOps
4.3/4.4 from the Play Store.
Original comment by mark.che...@googlemail.com
on 11 Dec 2013 at 4:45
My N4 is not rooted and not updated yet to 4.4.2 Once I have the updated I will
let you know if still works as right now it is ok.
Original comment by andre.ve...@gmail.com
on 11 Dec 2013 at 5:07
Issue 823 has been merged into this issue.
Original comment by f...@ub0r.de
on 15 Dec 2013 at 5:35
[deleted comment]
The N4 is now updated to 4.4.2 and as posted above. Did the workaround before
updating.
Works great as before with the 4.3
But of course this should work without workarounds etc etc and fixes.
As this is an open OS and they should not be closing it more and more with
every update.
Original comment by andre.ve...@gmail.com
on 16 Dec 2013 at 3:00
I was able to allow SMSDroid and WebSMS the permission to write SMS/MMS via App
Aps X on a rooted Android 4.4.2 device.
Now I can delete SMS and it seems that I was able to send a SMS directly via
WebSMS.
But I cannot choose WebSMS when I try to send a SMS via SMSDroid.
Also the SMS I sent from WebSMS does not appear in the SMS database - I cannot
see it anywhere.
Any ideas?
Original comment by msebald1...@googlemail.com
on 30 Dec 2013 at 10:08
This workaround worked for me on a non rooted N4 and before upgrading to the
4.4.2
===============
There is a workaround available for WebSMS at least as follows:
1. Install a version of WebSMS prior to 4.7.1 (An APK for 4.3 is available at
http://code.google.com/p/websmsdroid/)
2. Install App Ops Starter from Google Play and open it
3. Go to the Messaging tab, find WebSMS and tap on it
4. Turn on the "Write SMS/MMS" option
Felix is aware of the workaround. The logic that prevents messages being
written to the database with Kitkat needs to be modified to enable it to work
on the latest version.
In principle this should also work with SMSDroid. No guarantee that it will
continue to be available for future Android versions, but it does provide an
interim solution at least.
=================
Original comment by andre.ve...@gmail.com
on 30 Dec 2013 at 10:15
Thanks for your reply.
I was able to perform everything exept I did not install an older version of
SMSDroid or WebSMS. Is this the key?
If yes, I install WebSMS 4.7 (current is 4.7.1) and SMSDroid 1.5 (current is
1.5.1)? Can I upgrade after I check the permissions with App Ops X?
Original comment by msebald1...@googlemail.com
on 30 Dec 2013 at 10:22
Yes that is the key (WebSMS prior to 4.7.1 (An APK for 4.3 is available at
http://code.google.com/p/websmsdroid/)
Original comment by andre.ve...@gmail.com
on 30 Dec 2013 at 10:23
I cannot install WebSMS 4.7 on my device. No idea why. Maybe because it is not
compatible to 4.4.2?
Original comment by msebald1...@googlemail.com
on 30 Dec 2013 at 10:43
Read:
This workaround worked for me on a non rooted N4 and before upgrading to the
4.4.2
Original comment by andre.ve...@gmail.com
on 30 Dec 2013 at 10:53
Yeah, I read it. But I wanted to try it on 4.4.2 - and it does not work. So
nobody has to try it, too.
Hopefully there will be a new version and/or workaround.
I use a dual line SIM and need to send SMS from both numbers. So I use "normal"
SMS for one number (the main number) and WebSMS for the secondary number.
Switching the active number for every SMS is way too much...
Original comment by msebald1...@googlemail.com
on 30 Dec 2013 at 10:55
There will hopefully be a v4.7.2 soon once Felix has reviewed and merged my
code changes. Note that this will still require the App Ops permission change
to store the SMS messages on KitKat.
In response to #17, SMSDroid doesn't offer WebSMS as a choice for sending
messages on Kitkat currently. You can long press on the send button to work
around it.
Original comment by mark.che...@googlemail.com
on 30 Dec 2013 at 11:28
Thanks, the long press is the hint of the day, which you now made! ;-)
Original comment by msebald1...@googlemail.com
on 30 Dec 2013 at 11:38
Current websms version does not write sms into the database when running on api
19.
You can't do anything about it without changing code.
The prior version does while failing silently for most api 19 users.
There will be an update as soon as the code from Mark gets its final tweaks.
But I guess it's to late for most users because the workaround only worked
before 4.4.2.
Original comment by f...@ub0r.de
on 31 Dec 2013 at 10:44
Unless the device is rooted. I'm hoping that the permissions setting will also
survive an upgrade for those who have already applied it to an older version
and then upgraded to 4.4.2 but we will see.
It is still far from a perfect solution....
Original comment by mark.che...@googlemail.com
on 31 Dec 2013 at 11:18
SMSDroid Thoughts
-----------------
The issue with SMSDroid on 4.2.2 or later only offering the default messaging
application to send a message is due to changes in the way Android handles SMS
intents.
The longer term plan is to combine SMSDroid and WebSMS into a single
application so that it can work without any dependency on App Ops as a Kitkat
compliant default messaging app, however that will take more work and time.
In the mean time it is possible to fix the sending mechanism in SMSDroid so
that it will work better with the App Ops granted permission. There are a few
possible approaches to this:
i) Make the press behaviour the same as long press on Kitkat and later, i.e.
show a list of possible delivery applications each time. I suspect this may
become a nuisance having to select each time;
ii) Default to sending via WebSMS where installed, or the delivery
functionality built into SMSDroid where it isn't. This is probably my preferred
solution since I would imagine the point of using SMSDroid to most people is to
be able to send via WebSMS and WebSMS can send messages 'normally' as well;
iii) Any other suggestions?
Given it is a temporary fix it's unlikely to be worth doing anything overly
complicated. Given such a solution will still be dependent on App Ops (and
hence having a rooted device to set it up on 4.4.2 or later) I suspect this
will be a case of making an APK available for download to those who want it
rather than making it available on Google Play.
Original comment by mark.che...@googlemail.com
on 1 Jan 2014 at 5:30
Since you are asking and nobody commented on my suggestion, I will just come up
with it again ;)
Wouldn't it be possible - as an intermediate solution - to keep smsdroid and
websms seperated, but to implement some callbacks (intents?) in smsdroid which
websms can use to store the sent SMS? This way smsdroid would be the master sms
app which calls websms to send the SMS, which would in return callback smsdroid
to let it store the sent SMS.
I am not familiar with Android development but I think (from what I remember of
the 2.x API documentation which I browsed some time ago) it is possible to
define and call custom intents which could be used for something like that?
If this is possible at all it should be quite easy to implement and it would
not depend on App Ops or whatsoever since smsdroid would just always be the
default messaging app.
What do you think?
Original comment by dam...@googlemail.com
on 1 Jan 2014 at 6:45
I don't think it's quite as simple as that since SMSDroid will need to be set
as the default messaging application. I believe that requires that it is able
to receive new messages and write them to the messaging database for which it
currently relies on the AOSP Messaging Application (or Hangouts).
So that code needs to be added in any case.
Beyond that it is probably just as easy to combine WebSMS's sending
functionality into the SMSDroid code than to go down the route you suggest as
it will be largely a case of shifting existing code (easier for us novices of
which I am also one), and avoids issues such as how to handle if someone only
has WebSMS installed, and not SMSDroid as well.
Original comment by mark.che...@googlemail.com
on 1 Jan 2014 at 7:38
I agree to mark's comments.
iii) SMSdroid could implement a new chooser for the sms intent and save default
behavior internally. This would make switching default easier anyway.
Original comment by f...@ub0r.de
on 2 Jan 2014 at 1:36
If it were a permanent solution I'd probably go with Felix's option iii).
However that's more work for something that's likely to disappear once the apps
are merged, when the send functionality will be that which currently resides in
WebSMS anyway.
Does anyone reading this not use WebSMS for sending messages from SMSDroid
anyway?
Original comment by mark.che...@googlemail.com
on 2 Jan 2014 at 10:10
I just merged some changes into SMSdroid and WebSMS.
Changes in SMSdroid:
* basic default SMS app handling
* add a receiver to save massages from websms
* use WebSMS for sending messages if available
Changes in WebSMS:
* save messages via SMSdroid if available
* save messages via AppOps permissions if not
* silently fail if both is not available
TODO in SMSdroid
* MMS handling
* implement an own IntentChooser
* better notification if SMSdroid is not the default app (the current
AlertDialog is quite annoying)
I got a few different and overlapping change sets. Even the merged changes got
changed quite dramatically.
**Please reset your own master to my master before contributing new code.**
Please install and test the apps attached to this comment.
Original comment by f...@ub0r.de
on 4 Jan 2014 at 11:06
Attachments:
Great, thank you! :-)
I just installed both. SMSdroid asked if it should be the default SMS app. I
said yes.
Then I sent a SMS from SMSdroid and noticed that I only can choose WebSMS and
the long click seems not to be available anymore.
Then I sent the SMS through WebSMS which worked. But I still do not see the
written SMS back in SMSdroid and the Android SMS/MMS app.
So, in my eyes, things are a bit different but still not ok.
I'm on 4.4.2 btw and installed App Ops X before and set the permissions for
WebSMS and SMSdroid as writte above.
Original comment by msebald1...@googlemail.com
on 4 Jan 2014 at 11:26
Sent message saving also doesn't work for me, unless I'm using the SMS
connector.
The changes to ConversationListActivity.getComposeIntent that I'd been playing
with also fall back to using the built-in SMSDroid sender if enabled where
WebSMS is not installed. Might be worth having, though as I said before I doubt
there are many people using SMSDroid but not sending messages via WebSMS.
In order to address the long press issue, MessageListActivity.buildIntent needs
an additional line to clear the intent component when displaying the chooser,
to cover the case where it has already been defined as WebSMS:
if (showChooser) {
i.setComponent(null);
return Intent.createChooser(i, this.getString(R.string.reply));
}
Original comment by mark.che...@googlemail.com
on 4 Jan 2014 at 10:50
Also tested smsdroid on kitkat 4.4.2
Had the same results as described. No sent SMS are saved (even though it is the
default app and websms has write rights.
Original comment by greensun...@gmail.com
on 5 Jan 2014 at 2:39
I broke the code while refectoring. should work now, including the chooser fix.
Original comment by f...@ub0r.de
on 5 Jan 2014 at 3:10
Attachments:
Wow it does :-)
Somehow there's still a problem with writing (see screenshot). The number is in
international format.
Original comment by greensun...@gmail.com
on 5 Jan 2014 at 3:17
Attachments:
Apparently even in the system database only the name is saved.
Original comment by greensun...@gmail.com
on 5 Jan 2014 at 3:44
Attachments:
Hey everybody, I made a quick & dirty fix for known addresses (working!)
The problem was that previously, we didn't expect addresses like this
Known Name <+49123456789>:
maybe it's better to show the previous code:
recipients[i] = recipients[i].split(" ")[0];
-> added a pattern matcher.
@felix: I have sent a pull request to you on github
(https://github.com/felixb/smsdroid/pull/11)
Original comment by greensun...@gmail.com
on 5 Jan 2014 at 6:36
Sorry, it still does not work. Now different. When I short click on the
"WebSMS" button in SMSdroid it opens WebSMS and sends the SMS. But not like
yesterday where WebSMS stayed open and I also had to press the Send button
there. This time I just briefly saw WebSMS and the SMS was sent.
But the sent SMS still does not appear in SMSdroid.
If I long press the "WebSMS" button in SMSdroid I get: "Antworten. Diese Aktion
kann von keiner App ausgeführt werden." Also the written SMS text is gone then.
Original comment by msebald1...@googlemail.com
on 5 Jan 2014 at 9:40
Hey If you can't wait until Felix merges my fix for the correct saving of SMS,
you can use my locally compiled APKs.
Warning: you will have to uninstall the official application first and will
loose all your settings except the connectors. The APKs are unsigned, so you
probably have to use adb or some other tool. If you have problems, just reply.
Did you try the hidden setting for selecting the connector in SMSdroid?
Original comment by greensun...@gmail.com
on 5 Jan 2014 at 9:53
Attachments:
major fix for saving messages with already known names.
Original comment by f...@ub0r.de
on 6 Jan 2014 at 1:28
Attachments:
Greensun, I can wait, but thank you anyway, maybe others were interested. :-)
Felix: The sent SMS now appears in the SMS list, and it appears as it should.
:-) Great!
The issue with the long press on "WebSMS" is still there. I still get:
"Antworten. Diese Aktion kann von keiner App ausgeführt werden." Also the
written SMS text is gone then. I know that this issue was not addressed in the
posts since I brought it up here. ;-)
For me the built-in SMS app to send "normal" SMS is important, so also choosing
between WebSMS and the built-in app. Reason: I use a dual line SIM card. With
WebSMS I send private SMS with one number, with the built-in app I sent
business SMS with the other, active number.
Original comment by msebald1...@googlemail.com
on 6 Jan 2014 at 12:14
what about this?
Original comment by f...@ub0r.de
on 7 Jan 2014 at 3:12
Attachments:
Felix, the version from comment 45 is now showing all applications that I would
expect after tap & hold with a default set (had the same problem).
Original comment by eljo...@gmail.com
on 7 Jan 2014 at 6:44
The list looks great for me! It shows all kinds of apps where text messages can
be sent, e.g. WhatsApp, Viber, Telegram. Plus Titanium Backup, don't know why.
;-)
But, if I do not choose one and press the back button, the written text in
SMSdroid is gone.
Original comment by msebald1...@googlemail.com
on 7 Jan 2014 at 8:32
> But, if I do not choose one and press the back button, the written text in
SMSdroid is gone.
There were a few issues for this topic.
The thing is: SMSdroid sends the intent. Canceling the chooser is the same as
starting WebSMS and then go back. From SMSdroid's point of view, the message
got sent. That's why it disappears.
Original comment by f...@ub0r.de
on 9 Jan 2014 at 2:53
I understand and it is not a really big problem for me - as I know now and can
put the text in the clipboard first.
I am back here because I noticed something: I cannot send with the built-in SMS
app anymore. It is missing in the list and also when I open it directly it
tells me that SMS sending is turned off.
As written above I need to send via SMSdroid/WebSMS for private SMS messages
and I need to send through the built-in SMS app when I send business SMS
messages as I use a so called dual line SIM card.
I don't understand everything in detail here so maybe I asked twice or maybe
there is now clue, but I wanted to bring it up again. ;-)
Original comment by msebald1...@googlemail.com
on 19 Jan 2014 at 8:51
I guess, there is nothing we can do about. With android 4.4, there is only one
SMS app active at a time.
Original comment by f...@ub0r.de
on 27 Jan 2014 at 2:53
Original issue reported on code.google.com by
dam...@googlemail.com
on 7 Nov 2013 at 12:10