zoukankan      html  css  js  c++  java
  • java 获取黑屏信息保存在list中,截取字符执行

    ArrayList<String> list1 = new ArrayList<String>();

    Process p = Runtime.getRuntime().exec("adb shell settings get secure default_input_method");
                BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
                list1.clear();
                 while ((line = br.readLine()) != null) {
                 System.out.println(line+"oooooooooo");         
                 list1.add(line);
                 }            
                } catch (IOException e1) {
                 // TODO Auto-generated catch block
                 e1.printStackTrace();
                }

    String temp2=list1.get(0).toString().substring(0,list1.get(0).toString().length());//去掉第0个字符
           String[] str1=temp2.split(",");//以,号截取
           System.out.println(str1[0]+"333");//取第0个字符

    截取前[com.asus.ime/.IME, ]

    截取后com.asus.ime/.IME

  • 相关阅读:
    Android开发环境
    安卓学习
    Shuffle'm Up POJ
    Duizi and Shunzi HDU
    Find a path HDU
    Cyclic Nacklace HDU
    Keywords Search HDU
    HDU 1495 非常可乐
    J
    Fire Game FZU
  • 原文地址:https://www.cnblogs.com/dreamy890322/p/5771996.html
Copyright © 2011-2022 走看看