Forums

OverviewFelgo 2 Support (Qt 5) › mixing net.vplay.helper.VPlayActivity with background running service

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22386

    Marek

    Hi Felgo

     

    I have an app on Android running Gps service in background, I’m using “service” tag in AndroidManifest. If I set activity name and service name according to my package eg:

    package – mycompany.myapp

    activity – mycompany.myapp.GpsActivity

    service – mycompany.myapp.GpsService

    Ewerything works, gps service starts and also I can start front activity by clicking on service in Android task bar.

    However, when I try to use nativeUtils.displayCameraPicker to take a picture app does not receive picture, I mean onCameraPickerFinished is not called in application.

    How should I setup activity and service name ? Now I have :

    package mycompany.myapp

    activity – net.vplay.helper.VPlayActivity

    service – ?

    In order for the gps service to work, I’m using two classes GpsActivity.java GpsService.java

    Best,

    Marek

    #22392

    Alex
    Felgo Team

    Hi,

    did you use VPlayActivity as base class for your custom activity? This extends the QtActivity e.g. with methods needed for the callbacks from the camera picker.

    Cheers,
    Alex

    #22393

    Marek

    Hi Alex

    When I’m posting on the forum, I mark checkbox “Notify me of follow-up…” and I think it does not work, I’m not receiving any emails.

    To the point, actually not…. I’m extending QtActivity this can be mistake, this is my class:

    package mycompany.myapp;
    
    import android.content.Intent;
    import android.os.Bundle;
    import org.qtproject.qt5.android.bindings.QtActivity;
    
    public class GpsActivity extends QtActivity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
        }
    }

    I will try with VPlayActivity and report.

    Thanks,

    Marek

    #22394

    Marek

    Great! it works.

    import net.vplay.helper.VPlayActivity;
    
    public class GpsActivity extends VPlayActivity {
    

     

    Many Thanks

    Marek

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support