Receivng push notification using adb shell command -
i trying receive force notification in device using below adb shell command
adb shell broadcast -c com.xxxx.android -a com.google.android.c2dm.intent.receive -e info "data"
but didn't receive force messages , there no errors
the output broadcasting:
intent { act=com.google.android.c2dm.intent.receive cat=[com.myapp] (has extras) } broadcast completed: result=0
can please help me on this.
thanks
here basic utilize of adb broadcast command:
adb shell broadcast -a <intent_name> -n <package_name>/<receiver_name> [--ei <extra_key> <extra_int_value>] [--es <extra_key> <extra_string_value>] [--ez <extra_key> <extra_boolean_value>] [--el <extra_key> <extra_long_value>] [--ef <extra_key> <extra_float_value>] [--eu <extra_key> <extra_uri_value>] [--ecn <extra_key> <extra_component_name_value>] [--e*a <extra_key> <extra_*_value>[,<extra_*_value...]]
and can find receiver_name in androidmanifest.xml:
<receiver android:name="foo.bar.somebroadcastreceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.send"> <intent-filter> <action android:name="com.google.android.c2dm.intent.receive" /> <category android:name="xyz.abc" /> </intent-filter> </receiver>
example command:
adb shell broadcast -a com.google.android.c2dm.intent.receive -n <your_package_name>/<your_receiver_name> --es "<extra_key>" "<extra_value>"
adb
No comments:
Post a Comment