20115 月4
package com.wizzer.tools;
import java.io.*;
import java.net.URLEncoder;
import java.util.*;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.NameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
public class BaseProtocol
{
private StringBuilder sb = new StringBuilder();
private HttpClient httpClient;
private HttpPost httpRequest;
private HttpResponse response;
private List<NameValuePair> nameValuePair = new ArrayList<NameValuePair>();
private static final int DIALOG1_KEY = 0;
private static final int DIALOG2_KEY = 1;
public BaseProtocol()
{
httpClient = new DefaultHttpClient();
}
/**
* *向服务器端发送请求 * *@paramurl *@throwsException
*
* @throws UnsupportedEncodingException
*/
public void pack(String url) throws Exception
{
httpClient = new DefaultHttpClient();
httpRequest = new HttpPost(url);
httpRequest.setEntity(new UrlEncodedFormEntity(nameValuePair));
response = httpClient.execute(httpRequest);
}
/** *得到返回数据 * *@paramurl *@return *@throwsException */
public String parse() throws Exception
{
// TODO状态处理500200
if (response.getStatusLine().getStatusCode() == 200)
{
BufferedReader bufferedReader2 = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
for (String s = bufferedReader2.readLine(); s != null; s = bufferedReader2.readLine())
{
sb.append(s);
}
}
return sb.toString();
}
/***
* 向服务器发送信息 * *@paramkey *@paramvalue
*
* @throws UnsupportedEncodingException
*/
public void addNameValuePair(String key, String value) throws UnsupportedEncodingException
{
nameValuePair.add(new BasicNameValuePair(key, URLEncoder.encode(value, HTTP.UTF_8)));
}
/** *返回JSONArray对象数据模型 * *@return *@throwsJSONException */
public JSONArray getJSON() throws JSONException
{
return new JSONArray(sb.toString());
}
}
20115 月4
手机开发:WM、Android、iOS
WEB开发:Java、.NET、ASP、PHP、JSP
应用开发:C#、JAVA……
欢迎IT从业人士加入,交流开发经验、技术,项目外包等信息。
QQ群:26310065
20115 月3
一个年轻人坐在鸟巢门口,神情沮丧。警察过来问:没买到今天滚石三十年的票?年轻人拿出两张票。警察惊讶地问他怎么不进去。小伙子说:我本来想约暗恋的女孩子一起,打电话给她。女孩子问是什么演唱会,结果我刚说了一个字,手机就没电了•••
20115 月2
重要提示,操作有风险,后果自负。
站长亲测成功了,不影响已写号的电话、短信、3G等功能,N82AP.plist 恢复顺序很重要。
成功后可通过email(APP ID)进行呼叫~
前提条件: 固件 4.2.6 已越狱,并安装 Cydia 软件源
1、在 Cydia 中搜索 ifile 安装之,
(也可以使用软件源 http://apt.weiphone.com、http://apt.178.com );
2、下载facetimepatch.deb 插件: http://u.115.com/file/f6f737d8f4
“facetime mail calling patch”插件。
3、 利用“同步助手”或其他工具,把facetimepatch.deb 上传至 iPhone 4;
4、iPhone 4 中打开 ifile 浏览到 facetimepatch.deb 选择安装器进行安装;
5、使用 ifile 编辑\System\Library\CoreServices\SpringBoard.app\N82AP.plist
把sms、telephony、unified-ipod都改为false,注销 iPhone4;
选择属性查看器
选择capabilities
6、注销或重启后打开WIFI,在设置中可以看到Facetime 选项,输入APP ID 密码激活

7、使用 ifile 把N82AP.plist 中的 telephony 选项改为true,注销 iPhone;
(此时可拨打任意号码,测试facetime可否使用,如果能打开facetime摄像头则说明成功)
8、使用 ifile 把N82AP.plist 中的 unified-ipod 选项改为true,注销 iPhone;
9、使用 ifile 把N82AP.plist 中的 sms 选项改为true,注销 iPhone;
注意7、8、9的操作顺序,不要出错。。。如果不成功也么什么影响,用Cydia卸载重来呵呵~
设置->电话->facetime 选项不要关闭,关闭就打不开了,
还有不要重启,否则又要重新设置plist再来一遍,囧,不完美啊~
10、针对重起后facetime被关闭,做了个SBS开关,在装了facetimepatch.deb补丁的基础上,再安装ericasadun.utilities(附件2),最后安装facetimepatchtoggle(附件3),设置好SBS,开关的效果就是按一下把要改的3个值变成false,再按一下把值变成true。false的时候把facetime重新开一下就行了。
附件2、3下载地址:http://u.115.com/file/f6fc18e02f
文章整理出自:http://www.in189.com/thread-146073-1-1.html
原作者:alexz@189.cn 自lucky_gjy