`
googlelee
  • 浏览: 114204 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
       private void getWordPageNumber()         {             wordApp = new MSWord.ApplicationClass();             wordDoc = wordApp.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing);             // 打开Word             object FileName = " ...
转发别人的代码
package cn.test.lee;   import android.app.Service; import android.content.Intent; import android.media.AudioManager; import android.media.MediaPlayer; import android.os.Bundle; import android.os.IBinder;   public class MyPlayerService extends Service implements MediaPlayer.OnPreparedListen ...
public void receive() throws Exception { Log.e(tag, "receive()"); // sharedpreference读取数据,用split()方法,分开字符串。 SharedPreferences pre = getSharedPreferences("SAVE_INFORMATION",MODE_WORLD_READABLE); String content = "name;pass";//pre.getString("save", "&qu ...
Intent intent = new Intent(TFNoticeTicketReceiver.ACTION_NOTICE); PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent,0); Calendar calendar = Calendar.getInstance();   AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);           alarmManager.set(Alar ...
D:\>keytool -list  -v -keystore D:\work\trunk\keystore\matrix.key -storepass 123456
import java.io.IOException; import java.net.Socket; import java.net.UnknownHostException; import java.security.KeyManagementException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.UnrecoverableKeyE ...
if(StringUtils.IsShowLog) { try { ByteArrayOutputStream os=new ByteArrayOutputStream(); byte[] b = new byte[4096];   for (int n; (n = is.read(b)) != -1;) {    StringUtils.logD(tag, ""+new String(b, 0, n));    os.write(b, 0, n); } InputStream is_ ...
private boolean getSavedPngAndSet(ImageView view, String logoUrl) { String dir = this.getExternalCacheDir().getAbsolutePath(); File rootFileDir = new File(dir); if(rootFileDir.exists() && rootFileDir.isDirectory()) {           String filename = logoUrl.replace("/&q ...
  private void saveBmpToSd(Bitmap bm, String url) {         if (bm == null || url==null) {              return;         }         if (10 >freeSpaceOnSd()) {             return;         }           String filename = url.replace("/", "").replace(":", "&qu ...
try { File f = new File(getExternalCacheDir().getAbsolutePath()+"my.xml"); OutputStream outPut = new FileOutputStream(f); XmlSerializer serializer=Xml.newSerializer();   serializer.setOutput(outPut, "utf-8");     serializer.startDocument("u ...

安装apk的函数

private void installApk(){ Log.d("login", "apkFile="+apkFile); File apkfile = new File(apkFile);   if (!apkfile.exists()) {   return;   }       Intent i = new Intent(Intent.ACTION_VIEW);   i.setDataAndType(Uri.parse("file://" + apkfile.toString( ...
void readSDCard() { String state = Environment.getExternalStorageState(); if(Environment.MEDIA_MOUNTED.equals(state)) { File sdcardDir = Environment.getExternalStorageDirectory(); StatFs sf = new StatFs(sdcardDir.getPath()); long blockSize = sf.getBlockSize(); long blockCount = sf.getBloc ...
Android 系统应用程序 Eclipse 开发环境的搭建 首先 , 将要修改的应用程序 , 从 alps( 源码根路径)\packages\apps 目录下拷贝到本地机子上,然后在Eclipse 新创建一个Android 项目,选择Create project from existing source 引进该应用程序,如图: <!-- [if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600&qu ...
goi
Global site tag (gtag.js) - Google Analytics