我在从我的Android应用程序上传.doc文件到.Net WCF时遇到问题.我能够发送文件,但在WCF端不支持.这是我上传的方法:
protected void checkinmethod(String rid) throws Exception {
File SDCardRoot = Environment.getExternalStorageDirectory();
//create a new file, specifying the path, and the filename
//which we want to save the file as.
File file = new File(SDCardRoot, rid+".doc");
InputStream in = new FileInputStream(file);
byte[] bytearray=new byte[(int) file.length()];
int ab=0;
do
{
ab=in.read(bytearray, 0, bytearray.length);
} while(ab>0);
InputStream mystream= new ByteArrayInputStream(bytearray);
InputStreamEntity se=new InputStreamEntity(mystream, 10000);
HttpPost request = new HttpPost("http://10.66.52.247/tutorwcf/Service.svc/Service/updateMyDoc1");
request.setHeader("Accept", "application/json");
request.setHeader("Content-type", "application/msword");
request.setEntity(se);
try {
DefaultHttpClient httpClient = new DefaultHttpClient(); …Run Code Online (Sandbox Code Playgroud) 我们可以推送一些像sqlitestudio这样的ide创建的数据库并将其推送到我们的模拟器中供应用吗?有没有办法将我们的".db"格式推送到andriod模拟器?
我有一个扩展的列表视图,在父节点和子项目中都有复选框.所有数据都来自Web服务,因此它的动态.
附图:

现在在菜单项上单击我想要获取所有复选框状态.请指导我如何获得其中使用的复选框的ID.
代码附:
/**
*
*/
public class Object_SecurityActivity extends ExpandableListActivity {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
// TODO Auto-generated method stub
return super.onChildClick(parent, v, groupPosition, childPosition, id);
}
@Override
public void onContentChanged() {
// TODO Auto-generated method stub
super.onContentChanged();
}
private AndroidClientEntity obj_android_client;
private static final String LOG_TAG = "ElistCBox2";
private String username, password, clientname;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
//setContentView(R.layout.main);
Intent security_intent = getIntent();
String id …Run Code Online (Sandbox Code Playgroud)