Giter Site home page Giter Site logo

siddeshpillai / qt-notification Goto Github PK

View Code? Open in Web Editor NEW
50.0 8.0 7.0 23.02 MB

This is an implementation of Local Notifications for iOS and Android using Qt.

License: Apache License 2.0

C++ 43.43% Objective-C++ 23.99% QMake 10.39% Java 17.99% QML 4.21%

qt-notification's Introduction

qt-notification

Trigger Local Notifications via qml for iOS and Android.

Developed on Qt Version: Qt 5.12
Platform Supported: Android - API 19+ and iOS - 8.0+

Usage

notification.show({caption: "hello", title : "notification", id:0});

Note

Local Notifications for iOS are triggered when the app is running in background

qt-notification's People

Contributors

sidopillai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qt-notification's Issues

No license?

How is this project licensed? I didn't find anything about the license, which means I can't use it.

Qt6 support

Is your feature request related to a problem? Please describe.
Yes. I want to use this in a Qt6 project. But the build will not work because of QAndroidJniObject

Describe the solution you'd like
A clear and concise description of what you want to happen.

Make it Qt6 compatible by using QJniObject

No notification in iOS

Notification is not coming for iOS sample.Is there any restriction related to ios version.Tested with ios 10 and 11.

Build issue with Qt5.11.1

I build this project, and get a error.

ERROR: Unable to open class file C:\Users\pcc\Desktop\qt-notification-master\build-QtMobileNotificationExample-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_Android_armv7_Felgo_08a452-Release\android-build\build\generated\source\r\debug\org\qtproject\example\QtMobileNotificationExample\R.java: No such file or directory

:processDebugResources FAILED

BUILD FAILED

Total time: 6.142 secs

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Warning: QML import could not be resolved in any of the import paths: QtNotification
Building the android package failed!
  -- For more information, run this command with --verbose.
18:46:09: 行程(process) "C:\V-PlaySDK\Felgo\android_armv7\bin\androiddeployqt.exe" 已離開(exit)。離開代碼(exit code) 14 。
Error while building/deploying project QtMobileNotificationExample (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.11.1 Android armv7 Felgo))
When executing step "Build Android APK"

123

456

so, I new a project and add include (./QtMobileNotification/QtMobileNotification.pri) in my .pro.

main.h

#include <QApplication>
#include <FelgoApplication>
#include <QQmlApplicationEngine>

#include <QtNotification.h>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    FelgoApplication felgo;
    felgo.setPreservePlatformFonts(true);

    QQmlApplicationEngine engine;
    QtNotification::declareQML();

    felgo.initialize(&engine);
    felgo.setMainQmlFileName(QStringLiteral("qml/Main.qml"));

    engine.load(QUrl(felgo.mainQmlFileName()));
    return app.exec();
}

main.qml

import Felgo 3.0
import QtQuick 2.0

import QtNotification 1.0

App {
    Notification {
        id: notification
    }

    NavigationStack {

        Page {
            title: qsTr("Main Page")

            Rectangle {
                anchors.fill: parent
                color: "blue"
                MouseArea {
                    anchors.fill: parent
                    onClicked: {
                        console.log(1)
                        notification.show({
                                          caption: "hello",
                                          title  : "notification",
                                          id     : 0
                                      });
                    }
                }
            }
        }

    }
}

it is build success.
Run in my mobile(android), but nothing happens after clicking.
Any idea!?
thanks.

Build issue with Qt5.10.0

Hello i am trying to build the project with Qt5.10.0 . i have proper setup of android SDK, NDK ant and can build my android project too but when i try this project i get following errors

Warning: QML import could not be resolved in any of the import paths: QtNotification

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android-build'.
> failed to find Build Tools revision 23.0.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 14.503 secs
Building the android package failed!
  -- For more information, run this command with --verbose.
00:15:12: The process "/home/nightmare/Qt5.10.0/5.10.0/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project QtMobileNotificationExample (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.10.0 for Android armv7))
When executing step "Build Android APK"
00:15:12: Elapsed time: 00:21.

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.