我必须开发浏览器,点击按钮点击发送推送通知 [英] I have to develop browser that on click send push notification on button click

查看:113
本文介绍了我必须开发浏览器,点击按钮点击发送推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建单页应用程序。应该有一个输入框和一个按钮,按此按钮应该将文本从上面的文本框发送到外部系统(基本上是休息调用)。应该有上述呼叫响应状态的警报

应用程序应该能够从外部系统接收通知并在第一页显示通知中收到的数据。

你可以使用任何开源技术来解决上述任务。尝试使用gcm或facebook解析



为我提供源代码。



我是什么尝试过:



我只试过这个...................... 。



包com.example.hp.browserbtn;



import android.content.Intent;

导入android.net.Uri;

导入android.support.v7.app.ActionBarActivity;

导入android.os.Bundle;

导入android.view.Menu;

导入android.view.MenuItem;

导入android.view.View;





公共类MainActivity扩展ActionBarActivity {



@Override

protected void onCreate(Bundle savedInstanceState){

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

}







public void browser(查看视图){

意图我b =((新的Intent(Intent.ACTION_VIEW,Uri.parse(http://www.google.com/search?q=<android>))));

startActivity( ib);

}

Create a single page app.There should be an input box and a button, pressing this button should send the text from the above text box to an external system(basically a rest call) . There should be an alert with above call's response status
App should be able to receive notification from external system and display the data received in the notification in the first page.
You can use any open source technology to solve the above task. Try to use gcm or facebook parse

Provide me the source code.

What I have tried:

I had tried only this.......................

package com.example.hp.browserbtn;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;


public class MainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}



public void browser(View view){
Intent ib = ((new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com/search?q=<android>"))));
startActivity(ib);
}

推荐答案

参见 http://www.codeproject.com/KB/android/#Android+Tutorial+Contest [ ^ ]。


这篇关于我必须开发浏览器,点击按钮点击发送推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆