活着剧情简介

"; EditText et; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); et = (EditText) findViewById(R.id.tv); et.setText(text); // 通知部分 NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notification notification = new Notification(); notification.when = System.currentTimeMillis(); notification.tickerText = "新通知"; notification.icon = R.drawable.ic_launcher; // notification.flags=Notification.FLAG_AUTO_CANCEL; // 这些设置相当于在build对象中设置 PendingIntent pendingIntent = PendingIntent.getActivity(MainActivity.this, 0, new Intent(MainActivity.this, MainActivity.class), 0); // 以下设置 相当于在build对象中设置 notification.setLatestEventInfo(MainActivity.this, "新通知", "通知内容", pendingIntent); notification.sound = Uri.parse("android.resource://" getPackageName() "/" R.raw.low); manager.notify(1, notification); //发送网络请求 RequestParams params=new RequestParams(); params.put("page", "1"); params.put("type", "xiami"); params.put("pageSize", "1"); HttpClientUtils.getInstance().request("http://www.buqi520.com/index.php?app=index&mod=like",params, new HttpPostCallBack() { @Override public void onSuccess(String result) { Log.d(TAG, "result:" result); } @Override public void onFailure(int error, String msg) { Log.d(TAG, "error:" error ",msg:" msg); } }, this); }}