Skip to content

Instantly share code, notes, and snippets.

@sedouard
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sedouard/9d23871e0c328f04b0ea to your computer and use it in GitHub Desktop.
Save sedouard/9d23871e0c328f04b0ea to your computer and use it in GitHub Desktop.
import com.microsoft.windowsazure.messaging.*;
import com.microsoft.windowsazure.notifications.*;
//full source at https://github.com/sedouard/AMSCrossPlatPush/blob/master/GoogleAndriod/CrossPlatformPush/src/com/example/crossplatformpush/MainActivity.java
public class MainActivity extends ActionBarActivity {
private final String PROJECT_NUMBER = "<YOUR PROJECT NUMBER FROM GOOGLE PLAY>";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//register our handler to the notifications manager
NotificationsManager.handleNotifications(this, PROJECT_NUMBER, Handler.class);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment())
.commit();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment