kivy / kivy/python-for-android

Broadcast parameter sent via not taking effect

Open
#3,117 3 comments 0 reactions 0 assignees View on GitHub
need-analysis need-discussion
Dominant language
Python
Stars
8.9k
Forks
2k
Avg merge
12h 20m
Merged PRs (30d)
9

Description

Success in PC
```bash
adb shell am broadcast -a android.intent.action.shbl.shut_down --ei time 6666
```
Faild in Phone
```python
from jnius import autoclass

mActivity = autoclass('org.kivy.android.PythonActivity').mActivity
Intent = autoclass('android.content.Intent')
intent = Intent("android.intent.action.shbl.shut_down")
intent.putExtra("time", 6666)
mActivity.sendBroadcast(intent)
```
Can receive broadcast, but did not receive parameter “time“

Contributor guide

Open the contributing guide

Research direction

Start with the adb broadcast command and the Python PyJNIus snippet in the issue, comparing how each sends the time extra. Trace the receiving side of the Android broadcast to determine where the parameter is lost, then verify that the receiver obtains time=6666 through the Python path as well as adb.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, python
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.