Sending intents from an Android-NDK application

后端 未结 2 1133
野性不改
野性不改 2021-01-05 22:24

I am writing an native application in C++ under android, and I need to broadcast some intents. Is this possible?

If you are going to point me to JNI, please give me

2条回答
  •  隐瞒了意图╮
    2021-01-05 23:19

    There is a am command that you can run that will send Intents to Activities or Services.

    const char *cmd = "am startservice -a %s"
                      " --ei ars_flag 2 --ei invitationType %d"
                      " --ei mode 1 --es ars_gadget_uuid \"%s\""
                      " --ei ars_conn_handle %d"
                      " --es ars_user_uuid \"%s\" --es ars_username \"%s\"";
    sprintf (cmdbuffer, cmd, ...);
    system (cmdbuffer);
    

提交回复
热议问题