Hello, answers follow:
On Apr 6, 9:13 pm, whome <[email protected]> wrote:
> Hello,
> I am a bit lost here, very simple use-case but would like to have a
> verification.http://smslib.googlecode.com/svn/smslib/branches/Queues/src/java/exam...
>
> I want to control ReadMessage/SendMessage using my own thread,
> actually its the same thread intance thats reading and later sending
> one or more messages. I do not want smslib to notify me for incoming
> messages.
>
> Settings.SERIAL_POLLING default value is false, but I think this is
> meant deeper to the driver level. Its not to control my user-level
> read/send invocation. Am I right?
Correct. This has nothing to do with what you are seeking. This
controls the low-level serial port comm in cases where the RTC/CTS
signals are not sent through correctly.
> I was browsing a source code but its a bit overwhelming, but did find
> AModemDriver.AsyncMessageProcessor inner class.
>
> But then I am lost, how do I minimize a number of smslib background
> threads and disable asynchronous sms notifications?
>
> Pseudo-code what I want to do:
> while(running) {
> //for-loop incoming sms messages and do the magic
> service.readMessages(smsIn, ALL);
> for(....) {
> // do the magic
> }
>
> // do app-logic
>
> // send pending outgoing messages and do the magic
> List smsOut = readPendingOutgoingMessagesFromApp();
> for(...) {
> service.sendMessages(msg);
> // do the magic after a message sent
> }
>
Can you please explain what is your purpose?
Why do you want to shutdown the extra threads? I mean, if you don't
set your notification callback methods (set them to null), the
background thread will never call you. Is this enough, or you want to
actually shutdown the threads?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SMSLib User Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/SMSLib?hl=en
-~----------~----~----~----~------~----~------~--~---