Dialogflow Sending User Data

≯℡__Kan透↙ 提交于 2019-12-08 09:25:35

问题


I have made a chat-bot in android in which i called google dialog-flow api. In google dialog-flow, I am calling an third part api. Now i want to implement user authentication in android app but not from google account. I want to authenticate users from the third party (the one i am connecting it to dialog-flow).

How can i send authentication data while sending message from android application below code how can i add credentials ? I want to attach user credentials while sending message is it possible ?

Note : I don't want to use google account to authenticate users.

Following is the Android code :

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        switch (requestCode) {
            case REQ_CODE_SPEECH_INPUT: {
                if (resultCode == RESULT_OK && null != data) {

                    ArrayList<String> result = data
                            .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
                    showTextView(result.get(0), USER);
                    //speak(result.get(0));
                    aiRequest.setQuery(result.get(0));
                    RequestTask requestTask = new RequestTask(MainActivity.this, aiDataService, 
                    customAIServiceContext);
                    requestTask.execute(aiRequest);

                }
                break;
            }
        }
    }

So here I am sending data from android application to dialog-flow. So here I want to attach username and password or user id to authenticate user

Thank you in Advance.

来源:https://stackoverflow.com/questions/58936205/dialogflow-sending-user-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!