让 Adobe Air 在 Android 上隐藏运行
有时候需要Air运行一些功能,但又不需要有界面,要运行的功能又不能用原生service代替。
Air 退出界面方法是(根视图popView已不在起作用)
NativeApplication.nativeApplication.exit();
但是这个方法同时也退出了程序停止运行。
developer
有时候需要Air运行一些功能,但又不需要有界面,要运行的功能又不能用原生service代替。
Air 退出界面方法是(根视图popView已不在起作用)
NativeApplication.nativeApplication.exit();
但是这个方法同时也退出了程序停止运行。
//Create video byte stream object
fis = receiver.getInputStream();
fillBuffer(buffer, 0, 4, fis); // 读取取客户端名字参数长度
int namelength = bytes2int(buffer);
System.out.println(“–client len—” + namelength);
fillBuffer(buffer, 0, namelength, fis);
String clientname = new String(buffer, 0, namelength);
System.out.println(namelength + “–clientname—” + clientname);
fillBuffer(buffer, 0, 4, fis); // 读取取H264参数长度
int headlength = bytes2int(buffer);
byte[] cdata = new byte[headlength];
fillBuffer(cdata, 0, headlength, fis);
//CDATA_PS.put(clientname, cdata);
FLV_PROPER.put(clientname, getFlvProperties(cdata));
try {
publisher = new TopicPublisher(clientname);
new Thread(new Distribution()).start();
} catch (Exception e) {
e.printStackTrace();
}
12306曾经按车站名查询余票,对站名做了编码,估计是防止别人直接使用余票查询功能。
这个算不上加密,不过也确实防止了被民间盗用。
编码是用js实现的,函数名还比较有欺骗性,还好我无意中发现了并翻译了JAVA和Objective-c两个版本
代码没什么难度
JAVA版本
public static String tranCode(String str, String pwd) {
String prand = “”;
for (int i = 0; i < pwd.length(); i++) {
prand += ((int) pwd.charAt(i));
}
蜂鸟社区 蜂鸟网影像门户网,蜂鸟网的受众群覆盖整个中国大陆、港澳台及全球华人聚居…
Read more