If you build the template and run ./scripts/emulator.sh or ./scripts/phone.sh the way the README and docs/building.md tell you to, the script installs your APK and then launches the PyDevices Runner, not your app. Both scripts default PACKAGE_ID to org.pydevices.runner (scripts/emulator.sh line 19, scripts/phone.sh line 20), a value carried over from android-runner. The template's own app id is org.pydevices.myapp, from package.domain and package.name in p4a_app/buildozer.spec.
Running PACKAGE_ID=org.pydevices.myapp ./scripts/emulator.sh works today, and the newcomer guide now says so, but the README (line 19) and docs/building.md (lines 12, 53, 54, 68) still show the bare command.
Two ways to fix it:
- Have the template's scripts default
PACKAGE_ID from p4a_app/buildozer.spec (package.domain + . + package.name), so renaming the app keeps working. Because scripts/ is synced from android-runner, the change would either go into android-runner's copies in a form that works for both, or become a template-side difference to preserve on sync.
- Keep the default and document the variable everywhere the scripts are shown.
The first fixes it for everyone who renames their app; the second is the smaller change.
If you build the template and run
./scripts/emulator.shor./scripts/phone.shthe way the README anddocs/building.mdtell you to, the script installs your APK and then launches the PyDevices Runner, not your app. Both scripts defaultPACKAGE_IDtoorg.pydevices.runner(scripts/emulator.shline 19,scripts/phone.shline 20), a value carried over from android-runner. The template's own app id isorg.pydevices.myapp, frompackage.domainandpackage.nameinp4a_app/buildozer.spec.Running
PACKAGE_ID=org.pydevices.myapp ./scripts/emulator.shworks today, and the newcomer guide now says so, but the README (line 19) anddocs/building.md(lines 12, 53, 54, 68) still show the bare command.Two ways to fix it:
PACKAGE_IDfromp4a_app/buildozer.spec(package.domain+.+package.name), so renaming the app keeps working. Becausescripts/is synced from android-runner, the change would either go into android-runner's copies in a form that works for both, or become a template-side difference to preserve on sync.The first fixes it for everyone who renames their app; the second is the smaller change.