Andoid调用Custom Protocol

    String textUrl = "myprotocal://192.168.0.1:8080/test?username=user&password=user";
    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(textUrl));
    intent.addCategory(Intent. CATEGORY_BROWSABLE);
    intent.addCategory(Intent. CATEGORY_DEFAULT);
    startActivity(intent)

Leave a Reply

Your email address will not be published. Required fields are marked *

*