Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo Plugins Support › OneSIgnal plugin

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #15959

    Nicola

    Hi,

    i have this:

    App {
    
        licenseKey: "mykey"
    
        OneSignal {
           id: onesignal
           logLevel: OneSignal.LogLevelVerbose
           appId: "myapp-id"
           googleProjectNumber: "project number"
           onNotificationReceived: {
                console.debug("Received notification with message:", message)
              }
           onUserIdChanged: {
                 console.debug("Got OneSignal user id:", userId)
           }
           onPluginLoaded: {
               console.log("PLUGIN LOADED")
           }
           enabled: true
         }
    

    In debug mode i see this message:

    D/OneSignal(17000): POST RECEIVED JSON: {"success":true,"id":"32f36fe6-0c34-4549-9551-881c51eXXXX"}
    I/OneSignal(17000): Device registered, UserId = 32f36fe6-0c34-4549-9551-881c51XXXX

    I don’t see the message about the plugin loaded.

    The plugin is not downloaded, so i can’t receive message. In this moment i can’t receive the notification neither gcm and onesignal!

    Nicola

    #15961

    Nicola

    Now with onesignal the device catch the notify, but  the  slots of the OneSignal (ie onNotificationReceived)  are not called!

    Nicola

    #15965

    Nicola

    I can share also the my code if it’s necessary.

    #15966

    Günther
    Felgo Team

    Hi Nicola!

    On which platform (Android/iOS) and device do you experience this issue?

    For a correct integration, you can have a look at our documentation. Especially for Android it is e.g. important to also add your application identifier to your build.gradle file.

     android {
       defaultConfig.applicationId = 'Identifier'
     }

    Best,
    Günther

     

    #15967

    Nicola

    Hi,

    i started with android, my file:

    buildscript {
        repositories {
            jcenter()
        }
    
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.0'
            classpath 'com.google.gms:google-services:3.0.0'
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            maven { url 'https://sdk.felgo.com/maven/' }
        }
    }
    
    apply plugin: 'com.android.application'
    
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        //compile 'net.vplay.plugins:plugin-gcm:2.+'
        //compile 'com.google.android.gms:play-services-gcm:10.0.1'
        //compile 'com.google.firebase:firebase-appindexing:10.0.1'
        compile 'net.vplay.plugins:plugin-onesignal:2.+'
    
            // Required for OneSignal, even if you have added FCM.
            compile 'com.google.android.gms:play-services-gcm:+'
    
            // Required for geotagging
            compile "com.google.android.gms:play-services-location:+"
    }
    
    android {
        /*******************************************************
         * The following variables:
         * - androidBuildToolsVersion,
         * - androidCompileSdkVersion
         * - qt5AndroidDir - holds the path to qt android files
         *                   needed to build any Qt application
         *                   on Android.
         *
         * are defined in gradle.properties file. This file is
         * updated by QtCreator and androiddeployqt tools.
         * Changing them manually might break the compilation!
         *******************************************************/
    
        compileSdkVersion androidCompileSdkVersion.toInteger()
    
        buildToolsVersion androidBuildToolsVersion
    
        sourceSets {
            main {
                manifest.srcFile 'AndroidManifest.xml'
                java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
                aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
                res.srcDirs = [qt5AndroidDir + '/res', 'res']
                resources.srcDirs = ['src']
                renderscript.srcDirs = ['src']
                assets.srcDirs = ['assets']
                jniLibs.srcDirs = ['libs']
           }
        }
    
        lintOptions {
            abortOnError false
        }
    
        defaultConfig {
        applicationId = 'com.niqt.wizardLVAP.PrenotaConUnClick'
              manifestPlaceholders = [onesignal_app_id: "MY APP KEY",
                                      // Project number pulled from dashboard, local value is ignored.
                                      onesignal_google_project_number: "REMOTE"]
            }
    
    }

     

    #15971

    Nicola

    I done a lot of tests today, but nothing. Summary of the situation:

    1. I receive the notification
    2. The onNotification is NOT called
    3. I don’t see onPluginLoaded
    4. i can’t set sendTag so i can’t send notification for tags
    #15973

    Nicola

    Other test, i removed from my code the block:

    OneSignal {
       id: onesignal
       userId: "-1"
       logLevel: OneSignal.LogLevelVerbose
       appId: "MYAPPID"
       googleProjectNumber: "970612XXXX"
       //notificationWhenActive: true
       onNotificationReceived: {
            console.log("Received notification with message:", message)
           userLoggedIn = true
          }
       onUserIdChanged: {
             console.log("Got OneSignal user id:", userId)
       }
       onPluginLoaded: {
           console.log("PLUGIN LOADED")
       }
       Component.onCompleted: {
           console.log("PLUGIN COMPLETED LOAD")
       }
       Component.onDestroyed: {
           console.log("DESTORR***")
       }
     }

    Ad i have the same effect, the deveice receive the notification (i think for the default init in the plugin library) So the problem seems how the OneSignal block is non executed, no signal, no event, nothing.

    #15979

    Nicola

    Hi,

    i regenerate my key (with different version), changed App to GameWindow in my main.qml, but nothing.

    I don’t know what i must think.  I have lost a lot of time and now i need to rewrite my application in other way!!

    Nicola

    #15980

    Lorenz

    Hi,

    We are investigating both your issues and will come back to you ASAP!

    Best,

    Lorenz

    Edit: we came back to you via mail.

    #15987

    Nicola

    Thanks, great product, great support! Well done!!!!

Viewing 10 posts - 1 through 10 (of 10 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded