[Interest] Android services

md at rpzdesign.com md at rpzdesign.com
Sat Mar 5 00:50:25 CET 2016


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
>




More information about the Interest mailing list