Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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);
}
Posted
Updated 5-May-16 3:56am
Comments
Dave Kreskowiak 5-May-16 9:47am    
No, we are not writing your code for you. It seems as though you copied your homework assignment and pasted it as a question. We're not here to do your homework for you.
xda prithvi 5-May-16 12:29pm    
okay.. thx for your feedback
Actually i am having trouble in GCM
Dave Kreskowiak 5-May-16 15:14pm    
Whatever "GCM" means....
Sergey Alexandrovich Kryukov 5-May-16 11:08am    
"Push notification on button click" it total absurd. It would not be push or would totally defeat the purpose of push.

"To develop browser" and "Create a single page app". Developing a browser also sounds as total absurd in this context.

—SA

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900