我必须开发浏览器,点击按钮点击发送推送通知

编程入门 行业动态 更新时间:2024-10-28 01:24:45
本文介绍了我必须开发浏览器,点击按钮点击发送推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

创建单页应用程序。应该有一个输入框和一个按钮,按此按钮应该将文本从上面的文本框发送到外部系统(基本上是休息调用)。应该有上述呼叫响应状态的警报 应用程序应该能够从外部系统接收通知并在第一页显示通知中收到的数据。 你可以使用任何开源技术来解决上述任务。尝试使用gcm或facebook解析 为我提供源代码。 我是什么尝试过: 我只试过这个...................... 。 包com.example.hp.browserbtn; import android.content.Intent; 导入android.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(www.google/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.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("www.google/search?q=<android>")))); startActivity(ib); }

推荐答案

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

更多推荐

我必须开发浏览器,点击按钮点击发送推送通知

本文发布于:2023-06-09 04:09:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/594934.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   浏览器   通知

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!