satyajit319 / websmsdroid

Automatically exported from code.google.com/p/websmsdroid
0 stars 1 forks source link

extend api to limit sms length #239

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what 
operating system?

Please provide any additional information below.

Original issue reported on code.google.com by jacwm...@gmail.com on 31 May 2010 at 11:49

GoogleCodeExporter commented 8 years ago
which connector?!?

Original comment by felix.bechstein on 1 Jun 2010 at 3:13

GoogleCodeExporter commented 8 years ago
I don'nt know if its possible to send more then 160 characters but the counting 
of
number 2 starts after 160 characters and after 320 highers up to 3 if its not
possible to devide or put together the sms its may be easier to say you have to 
stop
now and send a new sms when you have reached the 160? I did type till 4 haha 
and the
failed, now I know but I thought when the counter is highered up its also 
supported haha,
Thanks and fr greets this is the first time using this kind of feed back sorry 
if its
not optimal or correctly filled in.
WebSMS 3.1.4
HTC Desire
Its not a defect but a question if it could be implemented? Or belongs this 
question
to Connector
Which is WebSMS Betamax of Jon Aguera
Thanks fr gr Jacques

Original comment by jacwm...@gmail.com on 1 Jun 2010 at 3:45

GoogleCodeExporter commented 8 years ago
@jonaguera: if betamax does not support >160chars we need to improve the api to 
let
websms know this limit.

Original comment by felix.bechstein on 1 Jun 2010 at 4:05

GoogleCodeExporter commented 8 years ago
When trying to send a message larger than 160 chars, I get the following 
message from my 
betamax provider:

<SmsResponse> 
    <version>1</version> 
    <result>0</result> 
    <resultstring>failure</resultstring> 
    <description>The text message you are trying to send is larger than 160 characters, 
please shorten your message.</description> 
    <endcause></endcause> 
</SmsResponse> 

Original comment by jonagu...@gmail.com on 1 Jun 2010 at 5:36

GoogleCodeExporter commented 8 years ago
How can I communicate betamax the max chars allowed in a message?

Original comment by jonagu...@gmail.com on 1 Jun 2010 at 5:37

GoogleCodeExporter commented 8 years ago
i think we should make websms aware of max lenght via api.

Original comment by felix.bechstein on 2 Jun 2010 at 3:05

GoogleCodeExporter commented 8 years ago
So ... you will need to make some improvements in webSMS and then, we (the 
connectors) 
should inform webSMS of maxlenght allowed for the connector with some 
declaration or 
property in our project.

Is ok?

Original comment by jonagu...@gmail.com on 2 Jun 2010 at 3:10

GoogleCodeExporter commented 8 years ago
yep

Original comment by felix.bechstein on 2 Jun 2010 at 3:34

GoogleCodeExporter commented 8 years ago
this now is an API thing.

Original comment by felix.bechstein on 8 Jun 2010 at 4:01

GoogleCodeExporter commented 8 years ago
Please can you put it to medium, its really annoying when you got over the 160 
characters and the backcounting is not working optimal so you do'nt know when 
your below 160 again, may be you can take out the smscounter 1,2,3 for betamax 
because max is 160 characters?
Regards Jacques

Original comment by jacwm...@gmail.com on 6 Oct 2010 at 1:25

GoogleCodeExporter commented 8 years ago
Sorry i see it has changed to medium allready haha it was on low before?
Regards Jacques

Original comment by jacwm...@gmail.com on 6 Oct 2010 at 1:28

GoogleCodeExporter commented 8 years ago
@jonaguera: i just do not have the time to implement this.
please check the length in the connector before sending and throw a 
WebSMSException if the length is to long.

Original comment by felix.bechstein on 6 Oct 2010 at 7:57

GoogleCodeExporter commented 8 years ago
ok, i will do it this weekend

Original comment by jonagu...@gmail.com on 6 Oct 2010 at 9:08

GoogleCodeExporter commented 8 years ago
Please let me know when it's done since I'd like to limit messages to 160 chars 
in MeinBMW connector, too.

Original comment by silas.gr...@gmail.com on 31 Oct 2010 at 1:12

GoogleCodeExporter commented 8 years ago
@jonaguera: did you implement this in latest betamax connector?

Original comment by felix.bechstein on 5 Nov 2010 at 6:45

GoogleCodeExporter commented 8 years ago
I haven't did it yet
:(

I'll try to fix this ASAP.

Original comment by jonagu...@gmail.com on 16 Nov 2010 at 2:42

GoogleCodeExporter commented 8 years ago
any updates?

Original comment by felix.bechstein on 27 Dec 2010 at 7:50

GoogleCodeExporter commented 8 years ago
No more updates I'm sorry to tell that my father has died 11 december.
On the age of 62. The world has lost a special man. Our husband, Father and 
Friend .

Original comment by jacwm...@gmail.com on 27 Dec 2010 at 8:52

GoogleCodeExporter commented 8 years ago
@felix is thin now implemented or should I do this? Because it is releated with 
other connector issues.

Original comment by herrl...@gmail.com on 27 Dec 2010 at 11:43

GoogleCodeExporter commented 8 years ago
@jacwmass: heartfelt condolences, i really do not know, what do say :(

@herrlado: as it is not that easy to heck the length, you should at least throw 
an exception if the limit is reached, or let the user decide, to send not 
concatenated but multible sms as you did for arcor.

Original comment by felix.bechstein on 28 Dec 2010 at 6:59

GoogleCodeExporter commented 8 years ago
Issue 506 has been merged into this issue.

Original comment by f...@ub0r.de on 3 May 2011 at 8:10

GoogleCodeExporter commented 8 years ago
I added a pull request to the repo that gives an initial implementation of this:
https://github.com/felixb/websms/pull/1

The behaviour is: if the message length limit is set in the connector spec 
(prefsConnectorSpec.getLimitLength()), then on each change to the text in the 
message input field the total length (entered text + signature) is checked 
against this maximum length. If the total length is greater than the maximum 
length, the message is truncated, chopping off the extra characters.

This makes the message input field behave (almost) exactly like a text input 
field in a browser when a maximum character length is set. When the user 
reaches the maximum number of characters, attempting to type further will do 
nothing.

I have also added a toast message (separate commit, same pull request) to alert 
the user when they hit the message length limit.

I have intentionally not dealt with anything to do with allowing the users to 
decide splitting behaviour, as I believe this should be handled by the 
connectors. Either way, setting an absolute maximum length as this will allow 
is desirable.

Original comment by fint...@gmail.com on 2 Sep 2011 at 9:27

GoogleCodeExporter commented 8 years ago
i just merged your code into master,
thanks a lot.

Original comment by f...@ub0r.de on 2 Sep 2011 at 2:34

GoogleCodeExporter commented 8 years ago

Original comment by f...@ub0r.de on 19 Sep 2011 at 5:52