Pushkraj Jori
Pushkraj Jori

Reputation: 359

User ACTION_VIEW Intent to open URL In APP

I am new to android and working on small project where i am using

   customerSupport.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(config.tawkto));
                startActivity(browserIntent);
            }
        });

to open my public static final String tawkto = "https://tawk.to/chat/xxxxxxxxxxxxxxxxxxxxxxxx/default";

So how can I make sure my config.tawkto will open in my own app, not in another browser.

Thanks in Advance.

Upvotes: 0

Views: 308

Answers (1)

Chandan Sharma
Chandan Sharma

Reputation: 2933

For that you have to use WebView, Follow this steps,

  1. Create New Activity and use WebView in that activity
  2. Load your config.tawkto Url in that WebView
  3. Redirect to that WebView Activity, in your case when user click on customerSupport button.

Upvotes: 1

Related Questions