Device management is the generic term used for technology that allows third parties to carry out the difficult procedures of configuring mobile devices on behalf of the end user (customer). Third parties would typically be wireless operators, service providers or corporate information management departments. Through device management, an external party can remotely set parameters, conduct troubleshooting servicing of terminals, install or upgrade software.
OMA Device Management V1.2 - Status: Approved Enabler- Release Date: 2007-02-09
Enabler Package
OMA-ERP-DM-V1_2-20070209-A.zip
ERELD
Enabler Release Definition for OMA Device Management
OMA-ERELD-DM-V1_2-20070209-A.pdf
Req Doc
Device Management Requirements
OMA-RD-DM-V1_2-20070209-A.pdf
Specifications
Device Management Bootstrap
OMA-TS-DM_Bootstrap-V1_2-20070209-A.pdf
Device Management Notification Initiated SessionNotification Initiated Session
OMA-TS-DM_Notification-V1_2-20070209-A.pdf
Device Management Protocol
OMA-TS-DM_Protocol-V1_2-20070209-A.pdf
Device Management Representation Protocol
OMA-TS-DM_RepPro-V1_2-20070209-A.pdf
Device Management Security
OMA-TS-DM_Security-V1_2-20070209-A.pdf
Device Management Standardized Objects
OMA-TS-DM_StdObj-V1_2-20070209-A.pdf
Device Management Tree and Description Serialization
OMA-TS-DM_TNDS-V1_2-20070209-A.pdf
Device Management Tree and Description
OMA-TS-DM_TND-V1_2-20070209-A.pdf
DTD
DM Device Description Framework (OMA-DMDDF)
OMA-SUP-dtd_dm_ddf-V1_2-20070209-A.dtd
Support Files
Application Characteristic for OMA Device Management
OMA-SUP-ac_w7_dm-V1_0-20070209-A.txt
Device Management detail information management object
OMA-SUP-MO_DM_DevDetail-V1_2-20070209-A.txt
Description of the Device Management information management object
OMA-SUP-MO_DM_DevInfo-V1_2-20070209-A.txt
Device Management Account management object
OMA-SUP-MO_DM_DMAcc-V1_2-20070209-A.txt
The Open Mobile Alliance Data Synchronization V1.1.2 specifications are based on the SyncML Initiative v1.1.1 Data Synchronization specifications and make use of the OMA SyncML Common v1.1.2 specifications as specified in the OMA SyncML Common specifications Enabler Release Definition [ELREDSC]. The OMA Data Synchronization v1.1.2 Enabler Release release provides for the definition and promotes a set of universal specifications for data synchronization.
OMA Data Synchronization V1.2 - Status: Approved Enabler - Release Date: 2006-07-10
Enabler Package
OMA-ERP-DS-V1_2-20060710-A.zip
ERELD
Enabler Release Definition for Data Synchronisation
OMA-ERELD-DS-V1_2-20060710-A.pdf
Specifications
Email Data Object Specification
OMA-TS-DS_DataObjEmail-V1_2-20060710-A.pdf
File Data Object Specification
OMA-TS-DS_DataObjFile-V1_2-20060710-A.pdf
Folder Data Object Specification
OMA-TS-DS_DataObjFolder-V1_2-20060710-A.pdf
SyncML Data Synchronisation Protocol
OMA-TS-DS_Protocol-V1_2-20060710-A.pdf
SyncML Representation Protocol, Data Synchronization Usage
OMA-TS-DS_DataSyncRep-V1_2-20060710-A.pdf
SyncML Device Information
OMA-TS-DS_DevInf-V1_2-20060710-A.pdf
Support Files
DTD for OMA Data Synchronization Device Information
OMA-SUP-DS_DevInf_DTD-V1_2-20060710-A.zip
Application characteristics for OMA Data Synchronization
OMA-SUP-DS_W5AppChar-V1_2-20060710-A.zip
The Open Mobile Alliance SyncML Common V1.2.x specifications are based on the OMA SyncML Common V1.1.2 specifications with the addition of previous requirements and change requests identified in the SyncML Initiative..
The OMA SyncML Common Specifications include documents which define the binding requirements for communicating SyncML over various transports. Although SyncML is transport independent, a set of common bindings is defined to encourage interoperability.
OMA SyncML Common Specification V1.2.1 - Status: Approved Enabler - Release date: 2007-08-13
Enabler Package
OMA-ERP-SyncML-Common-V1_2-20070813-A.zip [2.2 MB]
ERELD
Enabler Release Definition for SyncML Common Specification
OMA-ERELD-SyncML_Common-V1_2_1-20070813-A.pdf
Specifications
SyncML HTTP Binding
OMA-TS-SyncML_HTTPBinding-V1_2_1-20070813-A.pdf
SyncML Meta Information
OMA-TS-SyncML_MetaInfo-V1_2_1-20070813-A.pdf
SyncML OBEX Binding
OMA-TS-SyncML_OBEXBinding-V1_2-20070221-A.pdf
SyncML Representation Protocol
OMA-TS-SyncML_RepPro-V1_2_1-20070813-A.pdf
SyncML Server Alerted Notification
OMA-TS-SyncML_SAN-V1_2_1-20070813-A.pdf
SyncML WSP Binding
OMA-TS-SyncML_WSPBinding-V1_2-20070221-A.pdf
Support Files
Document Type Definition
OMA-SUP-DTD_SyncML_MetaInfo-V1_2-20070221-A.txt
Document Type Definition
OMA-SUP-DTD_SyncML_RepPro-V1_2-20070221-A.txt
intentservice是service的一个子类,这个类单独的开启了一个线程,利用handler的机制,把发送过来的intent放到消息列队中,一个接着一个的处理intent。
要使用这个类就要做到两条:
1 public MyIntentService() {
super("MyServicethread");
}
2 protected void onHandleIntent(Intent intent) {
Bundle bundle=intent .getExtras();
int t1= bundle.getInt("t1");
j=t1;
switch (j) {
case 11:
i=j;
break;
case 22:
i2=j;
break;
default:
break;
}
Log.e(">>>>>>>>>>>>>>>>>>>>>>>>>111", ""+t1);
}
例子:
1 <service android:name="MyIntentService"></service>在配置文件中加上;
2 MyIntentService 类
package com.hao.hello;
import android.app.IntentService;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
//使用IntentService,两点必须实现,一个是构造函数,另一个是实现onHandleIntent
public class MyIntentService extends IntentService {
public static int i=0;
public static int i2=0;
int j;
//传入父类构造方法的字符串"MyServicethread"将作为工作线程的名字
public MyIntentService() {
super("MyServicethread");
}
@Override
protected void onHandleIntent(Intent intent) {
Bundle bundle=intent .getExtras();
int t1= bundle.getInt("t1");
j=t1;
switch (j) {
case 11:
i=j;
break;
case 22:
i2=j;
break;
default:
break;
}
Log.e(">>>>>>>>>>>>>>>>>>>>>>>>>111", ""+t1);
}
}
3 主activity的调用
package com.hao.hello;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.TextView;
public class hello extends Activity {
TextView textView,textView2;
Handler handler=new Handler(){
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case 0:
textView.setText("" + MyIntentService.i);
handler.sendEmptyMessageDelayed(1, 50000);
break;
case 1:
textView2.setText("" + MyIntentService.i2);
break;
default:
break;
}
}
};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = new Intent(this, MyIntentService.class);
intent.putExtra("t1", 11);
startService(intent);
Intent intent2 = new Intent(this, MyIntentService.class);
intent.putExtra("t1", 22);
startService(intent);
textView = (TextView) findViewById(R.id.textView1);
textView2=(TextView) findViewById(R.id.textView2);
handler.sendEmptyMessageDelayed(0, 10000);
}
}
遍历SD卡:
package com.hilary; import java.io.File; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; /** * @Author: hilary * @Date: 2011-6-25 * * 遍历SD卡的文件 **/ public class MySD extends Activity { private Button btn; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.main); btn = (Button) findViewById(R.id.btn1); btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { /* 手机的SD卡目录都是在sdcard目录下,所以要得到SD卡的所有文件,就要从/sdcard目录查起 */ getAllFiles(new File("/sdcard")); } }); } /* 遍历接收一个文件路径,然后把文件子目录中的所有文件遍历并输出来 */ private void getAllFiles(File root){ File files[] = root.listFiles(); if(files != null){ for (File f : files){ if(f.isDirectory()){ getAllFiles(f); }else{ System.out.println(f); } } } } }
在遍历SD卡的时候需要得到操作SD卡的权限:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
在SD卡中创建文件夹及文件:
/* 创建SD对象 下面的两个对象是一个含意,只是名称不一样 */ File file = new File("/sdcard/text.txt"); File path = new File("/sdcard/ck"); /* 判断file文件是否存在,如果不存在则创建file文件 */ if(!file.exists()){ try { file.createNewFile(); System.out.println("text.txt 文件创建成功!"); } catch (IOException e) { e.printStackTrace(); } } /* 判断path文件夹是否存在,如果不存在则创建path文件夹 */ if(!path.exists()){ path.mkdirs(); System.out.println("ck 文件夹创建成功"); }
删除及重命名:
File file = new File("/sdcard/text.txt"); File newFile = new File("/sdcard/text2.txt"); File path = new File("/sdcard/ck"); /* 删除文件及文件夹 */ if(file.exists()){ file.delete(); } if(path.exists()){ path.delete(); } /* 给文件重命名 */ if(file.exists()){ file.renameTo(newFile); }