Code Monkey home page Code Monkey logo

Comments (10)

mcvendrell avatar mcvendrell commented on July 21, 2024

Coming to say the same:

Ti SDK 6.1.2 and I get this error:
08-08 12:42:41.679: E/AndroidRuntime(3078): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1962]: 101 could not load needed library 'libstlport_shared.so' for 'libnl.vanvianen.android.gcm.so' (load_library[1117]: Library 'libstlport_shared.so' not found)

from gcmpush.

mcvendrell avatar mcvendrell commented on July 21, 2024

I will autorespond: there is a fork updated with 6.x

https://github.com/skypanther/gcmpush/tree/master/dist

from gcmpush.

vasilestefirta avatar vasilestefirta commented on July 21, 2024

@mcvendrell The module from the link you've provided works just fine w/ Ti SDK 6+, however I'm experiencing an issue when the Push Notification does not show up when the app is closed/background (even if I can see some console logs regarding that the push notification message was received). Do you know by chance what can cause that problem? Thanks! 👍

from gcmpush.

mcvendrell avatar mcvendrell commented on July 21, 2024

Hi @vasilestefirta . I have no issues with this module. Works well for me, no matter if app is closed or backgrounded.
Just be sure that the expected payload from the server is right (if you are building the payload manually)

from gcmpush.

vasilestefirta avatar vasilestefirta commented on July 21, 2024

@mcvendrell thanks for confirming that! May I ask you if you generated the GCM api key using the Google Developers Console or Firebase Cloud Messaging console (which is a replacement for GCM, you can see the alert message on this page - https://developers.google.com/cloud-messaging/) ?

I created my GCM key using Firebase console and I wonder if that's the problem, since I saw an open issue regarding FCM support for this module:

#50

from gcmpush.

mcvendrell avatar mcvendrell commented on July 21, 2024

I used the new FCM

from gcmpush.

vasilestefirta avatar vasilestefirta commented on July 21, 2024

Interesting! Do you mind sharing your implementation for gcm.registerPush() method and your <android>...</android> section from your project's tiapp.xml file? I would really appreciate that! 🙏

from gcmpush.

mcvendrell avatar mcvendrell commented on July 21, 2024

Of course, nothing special (GCMsender... is the name for the FCM id):

gcm.registerPush({ senderId: Alloy.CFG.GCMsenderNotifId, notificationSettings: { smallIcon: 'notify.png', // Place icon in platform/android/res/drawable/ largeIcon: 'notify.png', // Same vibrate: true, // Whether the phone should vibrate sound: 'default', }, success: deviceTokenSuccess, // Success returns event.registrationId error: deviceTokenError, // Error returns event.error callback: receivePushMessage // Callback returns event.data });

And nothing in the tiapp.xml, this module doesn't need it.

from gcmpush.

vasilestefirta avatar vasilestefirta commented on July 21, 2024

@mcvendrell Thanks! It looks like the issue was happening because of the data I was sending from the server. I was sending text instead of message 🙂 Fixed it and now it works just fine!

from gcmpush.

mcvendrell avatar mcvendrell commented on July 21, 2024

@vasilestefirta that's why I warn about be sure on the payload. Excellent.

from gcmpush.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.