![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-native-google-app-invites
Advanced tools
Google App Invites for your react native applications
Let your users sign in with their Google account and Invite your contacts to use the app.
react-native-google-app-invites is a wrapper around Google App Invites so it can be used from an React Native application.
npm install react-native-google-app-invites --save
You will need:
CocoaPods (Setup)
Google Repository
package in Android SDK Manager
:android
(will start Android SDK Manager)Extras
folder package Google Repository
android/setting.gradle
...
include ':react-native-google-app-invites', ':app'
project(':react-native-google-app-invites').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-app-invites/android')
android/build.gradle
...
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.google.gms:google-services:1.5.0' // <--- add this
}
android/app/build.gradle
apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services' // <--- add this at the TOP
...
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:0.14.+"
compile project(":react-native-google-app-invites") // <--- add this
}
import com.slowpath.googleappinvites.RNGoogleAppInvitesModule; // <--- import
import com.slowpath.googleappinvites.RNGoogleAppInvitesPackage; // <--- import
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
......
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mReactRootView = new ReactRootView(this);
mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.addPackage(new MainReactPackage())
.addPackage(new RNGoogleAppInvitesPackage(this)) // <------ add this line to yout MainActivity class
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
mReactRootView.startReactApplication(mReactInstanceManager, "AndroidRNSample", null);
setContentView(mReactRootView);
}
// add this method inside your activity class
@Override
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (requestCode == RNGoogleAppInvitesModule.RC_APP_INVITES_IN) {
RNGoogleAppInvitesModule.onActivityResult(resultCode, data);
}
super.onActivityResult(requestCode, resultCode, data);
}
......
}
From your JS files for both iOS and Android:
var { NativeAppEventEmitter, DeviceEventEmitter } = require('react-native');
var GoogleAppInvites = require('react-native-google-app-invites');
if (Platform.OS === "ios") {
GoogleAppInvites.configure(
CLIENT_ID, // from .plist file
SCOPES // array of authorization names: eg ['https://www.googleapis.com/auth/plus.login']
);
} else {
GoogleAppInvites.init()
}
let Emitter = (Platform.OS === "android") ? DeviceEventEmitter : NativeAppEventEmitter;
Emitter.addListener('googleAppInvitesError', (error) => {
console.log('ERROR App Invites in', error);
});
Emitter.addListener('googleAppInviteIds', (body) => {
console.log('User invited these IDS:', body);
});
GoogleAppInvites.invite("Message", "Title", "http://deepLink");
FAQs
Google App Invites for your react native applications
The npm package react-native-google-app-invites receives a total of 4 weekly downloads. As such, react-native-google-app-invites popularity was classified as not popular.
We found that react-native-google-app-invites demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.