Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

doesn't work in TAndroidService

 Post Reply Post Reply
Author
Murat Gulerer View Drop Down
New Member
New Member
Avatar

Joined: 28 Jun 2016
Posts: 1
Post Options Post Options   Quote Murat Gulerer Quote  Post ReplyReply Direct Link To This Post Topic: doesn't work in TAndroidService
    Posted: 30 May 2017 at 3:58pm
Hi,

I downloaded TMSMQTT for Delphi 10.2 Tokyo, installed the bpl,  made a demo application that works on win32 and android, had some fun chatting with the boss. All is well up to that point.

Then I made an android service and tried the same thing. ConnectedStatusChanged is called, but it says "csReconnecting". Then it never enters the callback again. 

I see that the service is still alive inside adb logcat, but no further TMSMQTT callbacks are fired. 

Do I need a UI event loop for TMSMQTT component to work ? Can we use it inside a TAndroidService?


Back to Top
Gulerer Murat View Drop Down
New Member
New Member
Avatar

Joined: 04 Jul 2017
Posts: 2
Post Options Post Options   Quote Gulerer Murat Quote  Post ReplyReply Direct Link To This Post Posted: 07 Nov 2017 at 1:57pm
Can I get information about this message?
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 6901
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 07 Nov 2017 at 5:17pm

We have not validated this component against the usage from an Android service.

At this time, it is unsure whether we can support this and we'll need to investigate this as soon as we can allocate time for it.

Back to Top
Gulerer Murat View Drop Down
New Member
New Member
Avatar

Joined: 04 Jul 2017
Posts: 2
Post Options Post Options   Quote Gulerer Murat Quote  Post ReplyReply Direct Link To This Post Posted: 10 Nov 2017 at 1:24pm
We need to be able to call MQTT from the Android service, how else can I set up my own notification mechanism?
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 6901
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 2017 at 9:43am
As informed, we have at this point not done this validation nor investigation yet, so at this point we cannot answer this question. At this moment, we support the component for use in applications only till we could allocate time to do the necessary validations for use in a service.
Back to Top
Gordon Hamm View Drop Down
New Member
New Member
Avatar

Joined: 18 Nov 2013
Posts: 4
Post Options Post Options   Quote Gordon Hamm Quote  Post ReplyReply Direct Link To This Post Posted: 02 Dec 2017 at 4:26am
Hi, I am using this with Firemoney.. It seems to work fine with IOS unless it goes to sleep for a long time.. If it goes to background for a short period, I can reconnect just fine when IOS goes to foreground. If its background for a long time and I try to reconnect, I never can get a connection event.
Now, reading this, I thinking this might not work with Android.. I need to be able to have my app run in both IOS and android

what are the plans? I love the components for the most part, but thinking they are imature for firemonkey

Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 6901
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 08 Dec 2017 at 8:01pm
As explained, for v1.0 we focused on use from applications, not services.
As soon as time permits, we'll set the scope for development of the next version.
Back to Top
Gordon Hamm View Drop Down
New Member
New Member
Avatar

Joined: 18 Nov 2013
Posts: 4
Post Options Post Options   Quote Gordon Hamm Quote  Post ReplyReply Direct Link To This Post Posted: 15 Dec 2017 at 7:57pm
Actually, Ive got most everything working fine.. but when the app goes into the back ground, I disconnect. `(as IOS is going to put it to sleep anyway) then reconnect when It comes back to foreground. I works most of the time, but sometimes, The connect method just gets stuck. If you restart the app, everything is perfect. I wish these components were more popular to get more attention.. They are so valuable when you understand what they can do.

Back to Top
Rossi Marco View Drop Down
New Member
New Member
Avatar

Joined: 13 Aug 2018
Posts: 3
Post Options Post Options   Quote Rossi Marco Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 2018 at 2:53pm
Hi,
any news on making it work (without disconnect) in Android Service ?
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 6901
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 15 Oct 2018 at 12:28pm
Due to very high workload on other projects, we could unfortunately not yet handle this.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down