My emulator or device will not register. I have followed the
steps and the video. My question is,
”What is the necessary configuration for Android Studio to send Push
Notifications?”.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'
classpath 'com.android.tools.build:gradle:1.3.0-beta1'
classpath 'com.google.gms:google-services:1.3.0-beta1'
// NOTE: Do not place your application dependencies here; they
belong
// in the individual module
build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
}
}
apply plugin: ‘com.android.application’
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "formula4success.com.f4ttest"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile files('libs/backendless.jar')
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:cardview-v7:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
}
apply plugin: ‘com.google.gms.google-services’
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_push);
Backendless.initApp(this, "F94773E4-9623-07F8-FFA0-9A9DB43EF200", "D4839C34-EAE2-A216-FFD3-7269779FD200", "v1");
Backendless.Messaging.registerDevice("686480128374", new AsyncCallback<Void>() {
@Override
public void handleResponse(Void response) {
Log.i("My APP", "Device has been registered");
}
@Override
public void handleFault(BackendlessFault fault) {
Log.e("MY APP", "Server reported an error -" + fault.getMessage());
}
});
}
04-05 10:10:38.365 3090-3090/formula4success.com.f4ttest
I/art: Not late-enabling -Xcheck:jni (already on)
04-05 10:10:38.795 3090-3090/formula4success.com.f4ttest
W/System: ClassLoader referenced unknown path:
/data/app/formula4success.com.f4ttest-2/lib/x86
04-05 10:10:38.850 3090-3090/formula4success.com.f4ttest
I/GMPM: App measurement is starting up, version: 8487
04-05 10:10:38.850 3090-3090/formula4success.com.f4ttest
I/GMPM: To enable debug logging run: adb shell setprop log.tag.GMPM VERBOSE
04-05 10:10:39.429 3090-3096/formula4success.com.f4ttest
W/art: Suspending all threads took: 45.234ms
04-05 10:10:39.509 3090-3100/formula4success.com.f4ttest
I/art: Background sticky concurrent mark sweep GC freed 10231(601KB) AllocSpace
objects, 2(40KB) LOS objects, 0% free, 7MB/7MB, paused 30.823ms total 196.646ms
04-05 10:10:39.604 3090-3100/formula4success.com.f4ttest
W/art: Suspending all threads took: 9.371ms
04-05 10:10:39.790 3090-3100/formula4success.com.f4ttest
I/art: Background sticky concurrent mark sweep GC freed 240(61KB) AllocSpace
objects, 0(0B) LOS objects, 0% free, 15MB/15MB, paused 33.676ms total 82.797ms
04-05 10:10:39.944 3090-3118/formula4success.com.f4ttest
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
04-05 10:10:40.137 3090-3118/formula4success.com.f4ttest
I/OpenGLRenderer: Initialized EGL, version 1.4
04-05 10:10:40.352 3090-3118/formula4success.com.f4ttest
W/EGL_emulation: eglSurfaceAttrib not implemented
04-05 10:10:40.352 3090-3118/formula4success.com.f4ttest
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xabe3c200,
error=EGL_SUCCESS