简体   繁体   English

在启动时启动Qt应用程序-Android

[英]Starting Qt application on Boot up- Android

I know how to start an android application on BOOT of device. 我知道如何在设备的BOOT上启动android应用程序。 I have done that in Java using a BroadcastReceiver. 我已经在Java中使用BroadcastReceiver做到了这一点。 However, my isue is something else. 但是,我的感觉是另外一回事。 I'm kinda stuck at this problem: 我有点卡在这个问题上:

Problem: I'm using Qt for Android. 问题:我正在使用Qt for Android。 I have a Qt file which listens for TCP/IP connections. 我有一个Qt文件,用于侦听TCP / IP连接。 Once the connection with the client is established, I start displaying images and sounds. 与客户端建立连接后,我便开始显示图像和声音。 However, I want this listening to be a background service which starts on boot of device. 但是,我希望此侦听是从设备启动时启动的后台服务。 And only when the connection is established should the activity to display the images and sounds start. 并且只有在建立连接后,才可以开始显示图像和声音的活动。 Any ideas on how to begin/implement? 关于如何开始/实施的任何想法? Do I have to use JNI? 我必须使用JNI吗?

This is a reported issue how to build background services with Qt: 这是一个已报告的问题,如何使用Qt构建后台服务:

Build background service with Qt on android 在Android上使用Qt构建后台服务

For the time being, there is the `QtService/Activity* thing from there, but it may be handier in future releases as the time goes ahead. 目前,这里有`QtService / Activity *,但是随着时间的推移,在将来的版本中可能会更方便。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM