This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void publishPoints( Point point){ | |
pubNub.publish().channel("collaborator." + mCurrentUser.getEmail()) | |
.message(point); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"ringCentral":{ | |
"username":"14156609789" | |
,"password":"pubnub2!" | |
,"extension":"101" | |
,"access_token":"" | |
,"refresh_token":"" | |
,"isRingCentral":1 | |
} | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as _ from 'lodash'; | |
import * as PubNub from 'pubnub' | |
import { createStore } from 'redux'; | |
import * as Constants from '../constants' | |
import { Collaboration } from '../store/collaboration' | |
var channelMessageReducer = function(state = 0, action ){ | |
console.log("inside reducer: " + state + " action: " + JSON.stringify(action)); | |
if(state === 0){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void subscribeToBoard(String boardName){ | |
List<String> board = new ArrayList<String>(); | |
List<String> subscriber = new ArrayList<String>(); | |
//Add the board to the board list, this is the channel group we | |
//are adding a subscriber to. | |
board.add(boardName); | |
//Add the users personal channel to the group, remove when they leave | |
subscriber.add(getUser().getUid()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void subscribeToBoard(String boardName){ | |
pubNub.addChannelsToChannelGroup().channelGroup(boardName).channels(Array); | |
pubNub.subscribe().channelGroups() | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void authToFirebase(GoogleSignInAccount acct){ | |
AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null); | |
FirebaseAuth auth = FirebaseAuth.getInstance(); | |
auth.signInWithCredential(credential) | |
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { | |
@Override | |
public void onComplete(@NonNull Task<AuthResult> task) { | |
logger.debug("signInWithCredential:onComplete:" + task.isSuccessful()); | |
// If sign in fails, display a message to the user. If sign in succeeds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.pubnub.braindrain.activities; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; | |
import android.view.MotionEvent; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String[] findAllBoards(){ | |
return new String[] { | |
"awesome_board", | |
"evenbetter", | |
"ultimate" | |
}; | |
} |
NewerOlder