[Interest] Android services

Pendleton, Corey Corey.Pendleton at garmin.com
Mon Mar 7 18:46:21 CET 2016


You might find this interesting: https://bugreports.qt.io/browse/QTBUG-37221
According to the patch associated with that report: https://codereview.qt-project.org/#/c/149018/ this feature may be available to you with Qt 5.7.

Corey

-----Original Message-----
From: md at rpzdesign.com [mailto:md at rpzdesign.com]
Sent: Friday, March 04, 2016 5:50 PM
To: interest at qt-project.org
Subject: Re: [Interest] Android services

Why don't you create a skeleton test app and share with the group the source code.

I sent you a reply message yesterday suggesting the Android Job API.

You might find sweeter fruit using that.

md


On 3/4/2016 4:46 PM, Jason H wrote:
> So I am trying to implement a background service and it's not going very well. The service is being used to upload files when the UI is suspended.
>
> My usage differs from the http://www.kdab.com/qt-android-episode-7/ tutorial in a number of ways.
>
> 1. I have a Qt App
> 2. I have a subclassed QtActivity
> 3. I have a subclassed IntentService
> 4. The intent service calls the native statics functions.
> 5. I've added <service android:name=".MyUploadService" android:exported="false" android:enabled="true"/> to the manifest, and spec'd MyActivity as the activity.
>
>
> 6. MyActivity::onCreate calls:
>          Intent serviceIntent = new Intent(this, MyUploadService.class);
>          startService(serviceIntent);
>
> And that's where it stops.
>
> In my MyUploadService,
> 1. None of the below gets logged:
>      @Override
>      public MyUploadService() {
>          super("MyUploadService");
>          java.lang.System.out.println(this.getClass().toString() + " Initialized");
>      }
>
>      @Override
>      public void onCreate() {
>          java.lang.System.out.println(this.getClass().toString() + " Created");
>      }
>
>      @Override
>      public void onHandleIntent(Intent workIntent) {
>          java.lang.System.out.println(this.getClass().toString() + " onHandleIntent");
>          ...
>      }
>
> Once the service is started, it is occasionally sent messages for work to do. But it doesn't get that far.
>
>
> Help?
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>



________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be confidential and/or legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.



More information about the Interest mailing list