How to connect a network printer over Android?

后端 未结 6 514
轮回少年
轮回少年 2020-12-08 05:54

I want to code an Android app, which will connect to a network printer with a specific IP address, and then make a printing.

For printing I know that I need to write

6条回答
  •  醉话见心
    2020-12-08 05:59

    Just Add This Code After oncreate Method

    if (android.os.Build.VERSION.SDK_INT > 9) {
        StrictMode.ThreadPolicy policy = 
            new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
    }
    

提交回复
热议问题