user2567369
user2567369

Reputation:

GoogleCloudMessaging example

I am trying to implement gcm on my project in that i want to make device to device messaging application

here i read http://developer.android.com/google/gcm/client.html in that it suggest to download source code from the http://code.google.com/p/gcm site

but when i have downloaded the code in that i found class which are already deprecated below is the class code

public class DemoActivity extends Activity {

TextView mDisplay;
AsyncTask<Void, Void, Void> mRegisterTask;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    checkNotNull(SERVER_URL, "SERVER_URL");
    checkNotNull(SENDER_ID, "SENDER_ID");
    // Make sure the device has the proper dependencies.
    GCMRegistrar.checkDevice(this);         -
    // Make sure the manifest was properly set - comment out this line
    // while developing the app, then uncomment it when it's ready.
    GCMRegistrar.checkManifest(this); <--------------------------this classs is deprecated 
    setContentView(R.layout.main);
    mDisplay = (TextView) findViewById(R.id.display);
    registerReceiver(mHandleMessageReceiver,
            new IntentFilter(DISPLAY_MESSAGE_ACTION)); 

so is there any misunderstanding is done by me? can any body suggest me the example of *GoogleCloudMessaging * class's example

Upvotes: 1

Views: 278

Answers (1)

Siddhpura Amit
Siddhpura Amit

Reputation: 15128

Ya you are right but there is also one directory named gcm client

enter image description here

if you go there and browse you will get GoogleCloudMessaging example :)

Upvotes: 2

Related Questions