Skip to content

Commit

Permalink
Merge pull request #14 from JoaoCaixinha/master
Browse files Browse the repository at this point in the history
RealtimePushNotificationActivity now extends ReactActivity (fixes #13)
  • Loading branch information
realtime-framework committed Apr 27, 2016
2 parents 71361ae + a860a8b commit 66980a7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-realtimemessaging-android",
"version": "1.0.5",
"version": "1.0.6",
"description": "The Realtime Framework Cloud Messaging Pub/Sub client for React-Native Android",
"main": "RCTRealtimeMessagingAndroid.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion reactnativemessagingandroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ android {
}

dependencies {
compile ('com.facebook.react:react-native:0.13.+')
compile "com.facebook.react:react-native:+"
compile 'co.realtime:messaging-android:2.1.+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,37 @@
import android.app.Activity;
import android.os.Bundle;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactPackage;

import java.util.List;

/**
* Created by jcaixinha on 16/09/15.
*/
public class RealtimePushNotificationActivity extends Activity{
public class RealtimePushNotificationActivity extends ReactActivity {
private static Activity mainParent;


public static Activity getMainParent(){
return mainParent;
}

@Override
protected String getMainComponentName() {
return null;
}

@Override
protected boolean getUseDeveloperSupport() {
return false;
}

@Override
protected List<ReactPackage> getPackages() {
return null;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
mainParent = this;
Expand All @@ -25,7 +46,7 @@ private void processPushBundle()
{
Bundle extras = getIntent().getExtras();

if (extras != null) {
if (extras != null) {
Bundle originalExtras = extras.getBundle("pushBundle");

originalExtras.putBoolean("foreground", false);
Expand Down

0 comments on commit 66980a7

Please sign in to comment.