2012年3月13日
摘要: PendingIntent: //创建PendingIntent的方法: getActivity(Context context,int requestCode,Intent intent,int flags) //启动一个Activity getBroadcast(Context context,int requestCode,Intent intent,int flags) //发送一个广播 getService(Context context,int requestCode,Intent intent,int flags) //... 阅读全文
posted @ 2012-03-13 17:19 lee0oo0 阅读(327) 评论(0) 推荐(0)
摘要: 1.AppWidgetProviderInfo对象: 为App Widget提供元数据(meta-data),包括布局,更新频率等等数据。这个对象被定义在res/xml目录当中。 <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="294dp" android:minHeight="72dp" android:updatePeriodMillis="86400000" 阅读全文
posted @ 2012-03-13 16:22 lee0oo0 阅读(440) 评论(0) 推荐(0)
摘要: 经过了一番折腾,忙忙碌碌了一下午,终于搞明白了Android软件界面嵌入广告的方法,以下我以嵌入有米广告为例小结一下:步骤一,下载有米广告SDK,将 youmi-android.jar 导入想要嵌入广告的的工程中。1. 右键您的工程根目录,选择“Properties”2. 在左面板中选择“Java Build Path”3. 然后选择“Libraries”标签4. 点击“Add External JARs„”5. 选择 youmi-android.jar 的目录路径.6. 点击“OK”即导入成功步骤二,在AndroidManifest.xml文件中配置用户权限。请务必配置以下权限,否则将有可能 阅读全文
posted @ 2012-03-13 15:26 lee0oo0 阅读(1908) 评论(0) 推荐(1)
摘要: //获得相应的系统服务 TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); //使用TelephonyManager对象的listen(PhoneStateListenerlistener, int events) 第一个参数需要实现PhoneStateListenerlistener并实现相应的方法,第二个参数是PhoneStateListener的静态常量,此处由于是监听电话状态,所以需要传 入LISTEN_CALL_STATE... 阅读全文
posted @ 2012-03-13 14:36 lee0oo0 阅读(1956) 评论(0) 推荐(0)
摘要: 布局XML: <android.gesture.GestureOverlayView android:id="@+id/gesture1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gestureStrokeType="multiple"> </android.gesture.GestureOverlayView>***android.gesture.GestureOverla 阅读全文
posted @ 2012-03-13 11:37 lee0oo0 阅读(2495) 评论(0) 推荐(0)
摘要: 在AndroidManifest中指定的: <receiver android:name=".StartupReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> ***开机启动后系统发出的BroadcastReceiver <category android:name="android.intent.category.HOME" /> ***系统显示后第一个启动 阅读全文
posted @ 2012-03-13 11:06 lee0oo0 阅读(1067) 评论(0) 推荐(0)