摘要: public class StartupReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent startupintent = new Intent(context,StrongTracks.class); startupintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(startupintent);... 阅读全文
posted @ 2013-05-20 16:05 Gsdimz 阅读(520) 评论(1) 推荐(1) 编辑
摘要: ContentValues values = new ContentValues();values.put(NAME, "CMCC cmwap");values.put(APN, "cmwap");values.put(PROXY, "10.0.0.172");values.put(PORT, "80");values.put(MMSPROXY, "");values.put(MMSPORT, "");values.put(USER, "");values 阅读全文
posted @ 2013-05-20 16:04 Gsdimz 阅读(173) 评论(0) 推荐(0) 编辑
摘要: public void setBrightness(int level) { ContentResolver cr = getContentResolver(); Settings.System.putInt(cr, "screen_brightness", level); Window window = getWindow(); LayoutParams attributes = window.getAttributes(); float flevel = level; attributes.screenBrightness = flevel / 255; getWind 阅读全文
posted @ 2013-05-20 16:03 Gsdimz 阅读(145) 评论(0) 推荐(0) 编辑
摘要: (1) BitMap to inputStream: ByteArrayOutputStream baos = new ByteArrayOutputStream(); bm.compress(Bitmap.CompressFormat.PNG, 100, baos); InputStream isBm = new ByteArrayInputStream(baos .toByteArray()); (2)BitMap to byte[]: Bitmap defaultIcon = BitmapFactory.decodeStream(in); ByteArray... 阅读全文
posted @ 2013-05-20 16:01 Gsdimz 阅读(130) 评论(0) 推荐(0) 编辑
摘要: /** 获取存储卡路径 */ File sdcardDir=Environment.getExternalStorageDirectory(); /** StatFs 看文件系统空间使用情况 */ StatFs statFs=new StatFs(sdcardDir.getPath()); /** Block 的 size*/ Long blockSize=statFs.getBlockSize(); /** 总 Block 数量 */ Long totalBlocks=statFs.getBlockCount(); /** 已使用的 Block 数量 */ Long availableBlo 阅读全文
posted @ 2013-05-20 15:59 Gsdimz 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1、<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> 2、private String getLocalMacAddress() { WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiInfo info = wifi.getConnectionInfo(); return info.getMacAddress(); } 阅读全文
posted @ 2013-05-20 15:58 Gsdimz 阅读(136) 评论(0) 推荐(0) 编辑
摘要: < activity android:name="MyActivity" android:configChanges="orientation|keyboardHidden"> public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATIO 阅读全文
posted @ 2013-05-20 15:57 Gsdimz 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Uri uri = data.getData();String[] proj = { MediaStore.Images.Media.DATA };Cursor actualimagecursor = managedQuery(uri,proj,null,null,null);int actual_image_column_index = actualimagecursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);actualimagecursor.moveToFirst();String img_path = actualima 阅读全文
posted @ 2013-05-20 15:56 Gsdimz 阅读(252) 评论(0) 推荐(0) 编辑
摘要: http://pan.baidu.com/share/link?shareid=106157&uk=3710762942 阅读全文
posted @ 2013-05-20 15:52 Gsdimz 阅读(97) 评论(0) 推荐(0) 编辑
摘要: <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> private boolean getNetWorkStatus() { boolean netSataus = false; ConnectivityManager cwjManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); cwjManager.getActiveNetworkInfo();... 阅读全文
posted @ 2013-05-20 15:48 Gsdimz 阅读(96) 评论(0) 推荐(0) 编辑
摘要: package com.heaven.shopping.net;import java.util.ArrayList;import java.util.List;import java.util.Map;import org.apache.commons.lang3.StringUtils;import org.apache.http.HttpEntity;import org.apache.http.HttpHost;import org.apache.http.HttpRequest;import org.apache.http.HttpResponse;import org.apache 阅读全文
posted @ 2013-05-20 11:15 Gsdimz 阅读(502) 评论(0) 推荐(0) 编辑