摘要:
/***录音*@paramincomingNumber*/publicvoidstartRecorder(StringincomingNumber){//1.创建一个录音机的实例recorder=newMediaRecorder();//2.设置路径的数据源(VOICE_CALL模拟器和国外手机不支... 阅读全文
摘要:
publicvoidload(Viewview){//图片太大会导致内存溢出//Bitmapbitmap=BitmapFactory.decodeResource(getResources(),R.drawable.big);//创建一个配置参数BitmapFactory.Optionsopts=n... 阅读全文
摘要:
chcp 65001 UTF-8 65001GBK 936本文出自 “曾颐楠的播客” 博客,请务必保留此出处http://zengyinan.blog.51cto.com/9524976/1721475 阅读全文
摘要:
在进行数据库插入数据的时候,如果只是更改contact_id而不更改其他信息,会导致插入的contact_id自动和原来的id一样本文出自 “曾颐楠的播客” 博客,请务必保留此出处http://zengyinan.blog.51cto.com/9524976/1721473 阅读全文
摘要:
Intenti=newIntent(context,MainActivity.class);i.setFlag(Intent.FLAG_ACTIVITY_NEW_TASK);context.startActivity(i);本文出自 “曾颐楠的播客” 博客,请务必保留此出处http://zengyi... 阅读全文
摘要:
像锁屏、解锁这种频繁生成事件的广播接收者注册广播接收者不是在配置文件中 而是在界面添加代码: IntentFilter filter = new IntentFilter();filter.addAction("android.intent.action.SCREEN_ON");filter.a... 阅读全文
摘要:
intimgid=getResources().getIdentifier(images.get(arg0),"drawable","com.vtion.sleb.activities");本文出自 “曾颐楠的播客” 博客,请务必保留此出处http://zengyinan.blog.51cto.co... 阅读全文
摘要:
遇到这个错误会发生在XML解析【type = parser.next();】解决方法就是换一种机型。不是代码的问题本文出自 “曾颐楠的播客” 博客,请务必保留此出处http://zengyinan.blog.51cto.com/9524976/1721454 阅读全文
摘要:
##竖屏 portrait##横屏landscape##横竖屏切换的时候Activity不敏感 android:configChanges="orientation|keyboardHidden|screenSize"本文出自 “曾颐楠的播客” 博客,请务必保留此出处http://zengyinan... 阅读全文
摘要:
##广播事件的两种类型。 * 有序广播> 接收者有优先级,接收按照先后顺序接收,类似中央向下传文件。高优先级的接收者可以把广播消息给拦截,还可以修改广播的数据。 sendOrderedBroadcast(intent,null,new LastReceiver,null,1,"data",null)... 阅读全文
摘要:
publicvoidonReceive(Contextcontext,Intentintent){//TODOAuto-generatedmethodstub//Toast.makeText(context,"收到消息啦",0).show();Object[]objects=(Object[])in... 阅读全文
摘要:
/***录音*@paramincomingNumber*/publicvoidstartRecorder(StringincomingNumber){//1.创建一个录音机的实例recorder=newMediaRecorder();//2.设置路径的数据源(VOICE_CALL模拟器和国外手机不支... 阅读全文
摘要:
##混合的方式开启服务,服务的生命周期 * startService --- stopService > onCreate() --> onstartCommand() --> onstartConnand() --> onDestory()* bindService --- unbindServ... 阅读全文
摘要:
##IPC > inter process communication 进程间通讯 > aidl:android interface defination language安卓接口定义语言本文出自 “曾颐楠的播客” 博客,请务必保留此出处http://zengyinan.blog.51cto.com... 阅读全文
摘要:
/***获取手机唯一码*/publicstaticStringgetNumber(Contextcontext){TelephonyManagertm=(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);Stri... 阅读全文
摘要:
/**MD5加密*/publicstaticStringgetMD5Str(Stringstr){MessageDigestmessageDigest=null;try{messageDigest=MessageDigest.getInstance("MD5");messageDigest.rese... 阅读全文
摘要:
requestWindowFeature(Window.FEATURE_NO_TITLE); 在style文件中的style下加入true不显示标题栏(在AndroidManifest.xml文件中设置) android:theme="@android:style/Theme.NoTitleBar"... 阅读全文
摘要:
//透明状态栏getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);//透明导航栏getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCEN... 阅读全文
摘要:
Viewview=LayoutInflater.from(getApplicationContext()).inflate(R.layout.player,null);Viewview=inflater.inflate(R.layout.your_view_id,null);本文出自 “曾颐楠的播客... 阅读全文
摘要:
/***判断某张表是否存在*@paramtabName表名*@return*/publicbooleantabIsExist(StringtabName){booleanresult=false;if(tabName==null){returnfalse;}SQLiteDatabasedb=null... 阅读全文