Search code examples
androidnao-robotpepper

Launch android apps on pepper´s tablet in Naoqi 2.5


I installed an APK on my Pepper by following the instructions in this link.

I used the following command: qicli call ALTabletService._installApk http://198.18.0.1/apps/app-debug.apk

And get:

[W] 1396590449.100437 3669 qimessaging.transportsocket: connect: Connection refused


true

I don't know if this means that the installation succeeded or not but when using qicli call ALTabletService._listApks it doesn't show up in the list and I can't launch it using qicli call ALTabletService._launchApk com.android.app-debug. I get the response:

[W] 1396590620.654268 3688 qimessaging.transportsocket: connect: Connection refused
false

I don't know why I get "Connection refused" but I can launch a preinstalled APK while still getting the same message.

Does anyone know how to solve this?


Solution

  • Whether the APK succeeds or fails to be installed seems to depend on the APK itself and I'm not yet sure why. Test with the below process and let me know how you go. I successfully installed this apk as a test, but was unable to install some others.

    # copy the APK to the following location on Pepper
    scp <apk-file>.apk nao@<nao-ip>:/home/nao/.local/share/PackageManager/apps
    
    # listen for onApkInstalled event
    qicli watch ALTabletService.onApkInstalled
    
    # In a second terminal, try to install the apk
    qicli call ALTabletService._installApk http://198.18.0.1/apps/<apk-file>.apk
    

    If the installation was successful, you should see onApkInstalled: "<apk-id>" printed in the first terminal. The app id should then appear when calling qicli call ALTabletService._listApks and you can then run the app using qicli call ALTabletService._launchApk <apk-id>.

    If no apk installed message is received, there has been an error. I am currently unsure of the process for debugging the installation using ADB, as in this question, but that should reveal more about the reason for the installation failure.