Sample of 10.2 app without missing head

I'm in the progress of my application without a head, so I'm digging the pushCollector sample provided by BlackBerry at this link https://developer.blackberry.com/native/documentation/cascades/device_comm/push/developing_a_push_en...

"To download our sample application, visit the waterfalls sample applications and find the app Collector push in the device section and Communication." The .zip file that you download contains two folders: 10.0 and 10.2.

10.2 contains our example of application that runs on BlackBerry 10.2 headless. Our application shows you how to use an application without head to receive and process a push message. 10.2 file contains three projects. Projects are grouped in a single file .bar to collector demand push together. »

However, the zip file I downloaded contains only the example 10.0 and is not updated with 10.2. If someone could fix that?

Thank you

just checked, it's on github now, see you soon.

Tags: BlackBerry Developers

Similar Questions

  • How to create a shared library of Qt and use it on App without a head?

    Hi all

    I'm experimenting with some waterfalls headless basic application development, and I just hit another problem of blocking.

    I want to create a Qt library with some shared code between the head and user interface elements.

    That's what I did:

    1. created a new application without head the wizard project
    2. created a new library shared by using the wizard project. Adds a simple C++ (Qt not) class
    3. Set up the two parts of the Headless App to use the shared library ("Library in the workspace project" option from the "Add library...) (' Assistant).   Everything compiles and works very well so far.
    4. Now, I want to use the shared library Qt. I choose 'Library of the Standard BlackBerry platform' and ' platform > Qt Core "from the «add library...» "Wizard. Now, I had this error on the shared library project: C:\dev\bbndk\host_10_2_0_15\win32\x86\usr\bin\ntoarm-ld: could not find lQtCore.

    How to create a shared library of Qt and use it on App without a head?

    In fact, I would also use other NDK libraries on library shared as lbbdata and libbbdevice.

    I expect that workers would deal with all the problems for me. As an improvement, I suggest you add the selection screen platform library of the Wizard "Add library...". «the wizard «Shared Library Project»

    There is a model of library project

    https://github.com/BlackBerry/Cascades-community-samples/tree/master/Cascades-library-template

    Unfortunately, the library create Assistant isn't really useful #t

    There is also a great series on using headless headless library and user interface:

    http://devBlog.BlackBerry.com/2014/02/a-flexible-architecture-for-enterprise-mobile-applications-par...

  • The difficulty to integrate DeviceLockState in app without a head.

    Hi, I just did the native webworks passage and it was great sofar.

    However, I'm unable to integrating the function DeviceLockState in an application without a head that I am building.

    Here's my main.cpp

    #include "service.hpp"
    
    #include 
    #include 
    #include 
    
    #include 
    #include 
    
    using namespace bb;
    
    int main(int argc, char **argv)
    {
        Application app(argc, argv);
    
        // Create the Application UI object, this is where the main.qml file
        // is loaded and the application scene is set.
        Service srv;
    
        // Enter the application main event loop.
        return Application::exec();
    }
    

    Here is my service.cpp

    #include "service.hpp"
    #include "settings.h"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    #include 
    
    using namespace bb::platform;
    using namespace bb::system;
    
    Service::Service() :
            QObject(),
            m_notify(new Notification(this)),
                    m_notify2(new Notification(this)),
                    m_settings(new Settings(this)),
                    m_invokeManager(new InvokeManager(this))
            {
        m_invokeManager->connect(m_invokeManager, SIGNAL(invoked(const bb::system::InvokeRequest&)),
                    this, SLOT(handleInvoke(const bb::system::InvokeRequest&)));
    
            bb::platform::HomeScreen homeScreen;
           bool connectresult=  connect(&homeScreen, SIGNAL( lockStateChanged(bb::platform::DeviceLockState::Type) ),
                            this, SLOT( onLockStateChanged(bb::platform::DeviceLockState::Type) ));
    
                NotificationDefaultApplicationSettings settings;
                settings.setPreview(NotificationPriorityPolicy::Allow);
                settings.apply();
    
                m_notify->setTitle("Test");
                m_notify->setBody("Test is running.\n\n Select OPEN for settings.");
                m_notify2->setTitle("Test");
                m_notify2->setBody("Test has been stopped.\n\n Select OPEN for settings.");
    
                bb::system::InvokeRequest request;
                request.setTarget("com.example.Test");
                request.setAction("bb.action.START");
                m_notify->setInvokeRequest(request);
                m_notify2->setInvokeRequest(request);
    
                // other stuff
    }
    
    void Service::handleInvoke(const bb::system::InvokeRequest & request)
    {qDebug() << "##service got invoked: " << request.action();
        if (request.action().compare("com.DevJay.AutoThemeService.RESTART") == 0) {
                triggerNotification();
                m_settings->setValue("send", true).toBool();
                m_settings->setValue("flag",true).toBool();
                //updateWallpaper();
            }else if (request.action().compare("com.DevJay.AutoThemeService.STOPSERVICE") == 0) {
                qDebug() << "Headless stopped";
                bb::Application::instance()->requestExit();
                Notification::clearEffectsForAll();
                Notification::deleteAllFromInbox();
                m_notify2->notify();
            }/*else if(request.action().compare("com.DevJay.AutoThemeService.RESTART") == 0){
                triggerNotification();
            }*/
    }
    
    void Service::triggerNotification()
    {
        // Timeout is to give time for UI to minimize
        QTimer::singleShot(2000, this, SLOT(onTimeout()));
    }
    
    void Service::onLockStateChanged(bb::platform::DeviceLockState::Type newState)
    {qDebug()<<"onlockstatechanged";
    
    //do something
    
    }
    
    
    

    and my header service.hpp

    #ifndef SERVICE_H_
    #define SERVICE_H_
    
    #include 
    #include 
    #include "settings.h"
    
    namespace bb {
        class Application;
        namespace platform {
            class Notification;
        }
        namespace system {
            class InvokeManager;
            class InvokeRequest;
        }
    }
    class Settings;
    
    class Service: public QObject
    {
        Q_OBJECT
    public:
        Service();
        virtual ~Service() {}
    private slots:
        void handleInvoke(const bb::system::InvokeRequest &);
        void onLockStateChanged(bb::platform::DeviceLockState::Type newState);
        void onTimeout();
    
    private:
        bb::platform::Notification * m_notify;
        bb::platform::Notification * m_notify2;
        Settings * m_settings;
    
        bb::system::InvokeManager * m_invokeManager;
        void triggerNotification();
    };
    
    #endif /* SERVICE_H_ */
    

    I decclared under private slots slot and plug it into the .cpp service as described above. Qdebug shows that its connected but the slot is not called (I know this COS the qdebug nothing is displayed).

    Thankx for your help.

    Add to the service.hpp:

    private:
        HomeScreen* homeScreen;
    

    Then initialize the service.cpp class:

    homeScreen = new HomeScreen(this);
    

    Make sure you have:

    using namespace bb::platform;
    
  • How to implement the service as thread know app without a head?

    I want to implement some service such as GPS log app, SMS Firewall. I want just an expert to give some guidance on how to design app without head and how to interact without head with front UI thread?

    There is a documentation for it: here.

    Examples of applications: Collector Push and part of Xandroid UI/Xandroid part Headless

    Personally, I could not work from collector to push but the Xandroid works according to others.

    I tried to do a UI + app: separation logic and tried invoking the logical part on the system started but could not make it work too.

    If your application without head needs long running and is not triggered, you must submit a form to the https://developer.blackberry.com/jam/headless/

    I really hope that internal developers to release a simple beginning on the kind of Hello world system early in the example, two examples of applications are too complicated and are trying to squeeze too many different features together

  • App without head: how to check the status

    1. I read this on the BB site:

    Criticism

    Process that must be running at all times (for example, system processes)

    In the foreground

    Processes that are running in the foreground

    Background

    Processes that run in the background

    Stop

    Process involved in RAM without running

    The question is can we write the code to check the States of the app to trigger certain activities?

    I also want to know the other possible States of the life cycle such as: "application started", "closed app"...

    A problem critical of the app without head is memory management, and we can only until BB have a better explanation on the life cycle of the app without a head.

    2. for an application in the short-term, event after 20 years, the app is still listed on memory and CPU usage. That seems abnormal, because I guess that after 20 years, the application will be stopped and not be able to use the memory and CPU more.

    Can someone explain?

    Thank you very much!

    Would you like to take a look at this app, I wrote that has a component without head and uses QLocalSocket to communicate between the headless and the (https://github.com/blackberry/Cascades-Community-Samples/tree/master/wakemebybeacon) user interface process. There is also a blog explaining how it works here: http://devblog.blackberry.com/2014/07/wake-my-beacon/.

    You can detect changes in status of process on the part without head like this (https://github.com/blackberry/Cascades-Community-Samples/blob/master/wakemebybeacon/WakeMeByBeaconSe...) and manipulate them like this (https://github.com/blackberry/Cascades-Community-Samples/blob/master/wakemebybeacon/WakeMeByBeaconSe...).

    When a component without a head (process) is distributed will be passable for 20 seconds, after which it is moved to a queue where it receives no processor, but can be awakened (marked as executable) of certain classes of events. While stopped the headless process always retains a memory footprint, but is not available.

  • Get a Push notification on app without head and application

    Hello

    I have included an app without a head for my current application, because I am handling becomes class PushService when push comes this application without a head. But I pushservice in running my application also to get called when comes to push, and my request for traffic not called when the push... How can I get push notifications in both without head and noraml app.

    You can take a look at the documentation
    https://developer.BlackBerry.com/native/documentation/Cascades/device_platform/headless_apps/

  • Notification of status of application App permission without a head?

    After that we apply and wait, a developer receives an e-mail notification that they have now app without long head, sign permissions or does it right and you must test every day?

    I received an email notification.

  • Problem with conversion of a normal app in app without head

    "I made an example of code where you respond to messages (email, PIN) without user intervention is possible." The application is started and when a new message is received it respond and delete the new message.

    I need the app to start as soon as the phone is started. This is why I want to convert an application without the app. But he is not able to link the API if I set them in the part without the app. The reason is that in the .pro file of the game without head cascades10 should be removed to make headless (it's just one of the requirements). I fully meet all other requirements too for example: no assets etc.

    CONFIG += qt warn_on (cascades10) deleted

    But I must add

    LIBS +=-lbbpim which gives following error.

    /usr/lib/libbbpim.so: reference to 'QSqlDatabase::rollback()' the undefined

    /usr/lib/libbbpim.so: reference to 'QDomDocument::~QDomDocument()' the undefined

    When I add cascades10 then it compiles, but now it does not entirely the requirements of the app without a head.

    If I set the code part user interface of the application without a head, then it can compile and I can run the application. But in this case when I re - turn the phone on or off the UI of the application does not work.

    I do not understand how to convert a normal app in app without a head. I have read the example and followed all the instructions.  http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/headless_apps/

    But I need for email, PIM messages. "How can you do it?

    LIBS +=-lbb - lbbsystem - lbbplatform - lbbdata - lbbpim
    QT += declarative sql
    QT += xml

    He then satisfied and I can run too

  • Creating an application without a head without a user interface

    I use the NDK for about 2 weeks now and I can't seem to find any resource on the following blackberry Web site.

    I am creating an application without a head that would run every 24 hours on my blackberry.  I have the app created with Momentics headless and it does what I need it to do. But right now I need to have a button in a user interface to call him.

    What I'm trying to do is,

    1. Have created enforcement wihtout the need of a user interface for packing it or deployment using our company BES.

    If you can point me to a tutorial or an example that would be great.  Of course if you have a response to these two that is too !

    Thank you

    Lothus.

    Watch the timer shutter release for app without head, code snippets and explanations can be found here:
    https://developer.BlackBerry.com/native/documentation/device_platform/headless_apps/triggers.html#TI...

    If you need a more complete example, I can create one, but I don't know when I'll have the time to do it, he could be close to mid-January. But honestly, all the necessary code is already in the docs.

    Don't forget to register action TIMER_FIRED in your bar - descriptor.xml under your app without a head part, I think it is also covered in the docs.

  • App without head

    Hello guys what changes do I need to change in the CPC or hpp files to convert my simple app in app without head
    I have already added

    LIBS += -lbbplatform
    

    in my .pro file and take a permission to Run in backround (_sys_run_headless) & (sys_headless_nonstop) also... bar - descriptor.xml

    I suggest that you either look at the example app without head or just start with that and add your own code.

  • Using C++ in QML classes in app without head: refers to 'bb::device:VibrationController:staticMetaObject' the undefined

    Hi, I've been weeks of work on the BB and had a lot of problems. Some of them have been resolved, some were not without the support of the forum.

    Now I have a great difficulty that I can't find answer by Googling.

    I am grateful to some body can help.

    Here's a simple case that make the big problem for me:

    1. create an app without head with Momentics. 2 project will be generated HeadlessApp and HeadlessAppService.

    Without modification, this code works well.

    2. I'm link below to use VibrationController in HeadlessAppService: https://developer.blackberry.com/native/documentation/dev/integrating_cpp_qml/index.html#usingcclass...

    below the code has been added:

    -Add codes below to main.cpp HeadlessAppService

    #include 
    using namespace bb::device;
    

    then add qmlRegisterType as below

    Q_DECL_EXPORT int main(int argc, char **argv)
    {
    
       Application app(argc, argv);
    
       qmlRegisterType("bb.vibrationController", 1, 0, "VibrationController");
       ApplicationUI appui;
       return Application::exec();
    }
    

    3. to confirm the new code, I just right click on the project and select build project.

    Bang! I got several error I don't understand. (red lines are errors)

    08:44:30 **** Incremental Build of configuration Device-Debug for project headlessTest ****
    make -j4 Device-Debug
    make -C .//translations -f Makefile update
    make[1]: Entering directory 'D:/BB-dev/momentics-workspace/headlessTest/translations'
    C:/bbndk/host_10_3_1_12/win32/x86/usr/bin/lupdate headlessTest.pro
    Updating 'headlessTest.ts'...
        Found 2 source text(s) (0 new and 2 already existing)
    make[1]: Leaving directory 'D:/BB-dev/momentics-workspace/headlessTest/translations'
    make -C .//translations -f Makefile release
    make[1]: Entering directory 'D:/BB-dev/momentics-workspace/headlessTest/translations'
    C:/bbndk/host_10_3_1_12/win32/x86/usr/bin/lrelease headlessTest.pro
    Updating 'D:/BB-dev/momentics-workspace/headlessTest/translations/headlessTest.qm'...
        Generated 0 translation(s) (0 finished and 0 unfinished)
        Ignored 2 untranslated source text(s)
    make[1]: Leaving directory 'D:/BB-dev/momentics-workspace/headlessTest/translations'
    make -C ./arm -f Makefile debug
    make[1]: Entering directory 'D:/BB-dev/momentics-workspace/headlessTest/arm'
    make -f Makefile.Debug
    make[2]: Entering directory 'D:/BB-dev/momentics-workspace/headlessTest/arm'
    qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,C:/bbndk/target_10_3_1_995/qnx6/armle-v7/lib -Wl,-rpath-link,C:/bbndk/target_10_3_1_995/qnx6/armle-v7/usr/lib -Wl,-rpath-link,C:/bbndk/target_10_3_1_995/qnx6/armle-v7/usr/lib/qt4/lib -Wl,-rpath-link,C:/bbndk/target_10_3_1_995/qnx6/armle-v7/usr/lib/qt4/lib -o o.le-v7-g/headlessTest o.le-v7-g/.obj/applicationui.o o.le-v7-g/.obj/main.o o.le-v7-g/.obj/moc_applicationui.o    -LC:/bbndk/target_10_3_1_995/qnx6/armle-v7/usr/lib/bb1 -LC:/bbndk/target_10_3_1_995/qnx6/armle-v7/lib -LC:/bbndk/target_10_3_1_995/qnx6/armle-v7/usr/lib -LC:/bbndk/target_10_3_1_995/qnx6/armle-v7/usr/lib/qt4/lib -LC:/bbndk/target_10_3_1_995/qnx6//usr/lib/qt4/lib -lbb -lbbsystem -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps
    o.le-v7-g/.obj/main.o: In function `int qmlRegisterType(char const*, int, int, char const*)':
    c:/bbndk/target_10_3_1_995/qnx6/usr/include/qt4/QtDeclarative/qdeclarative.h:191: undefined reference to `bb::device::VibrationController::staticMetaObject'
    o.le-v7-g/.obj/main.o: In function `QDeclarativeElement':
    c:/bbndk/target_10_3_1_995/qnx6/usr/include/qt4/QtDeclarative/qdeclarativeprivate.h:87: undefined reference to `bb::device::VibrationController::VibrationController(QObject*)'
    o.le-v7-g/.obj/main.o:(.data.rel.ro._ZTVN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE[_ZTVN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE]+0x8): undefined reference to `bb::device::VibrationController::metaObject() const'
    o.le-v7-g/.obj/main.o:(.data.rel.ro._ZTVN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE[_ZTVN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE]+0xc): undefined reference to `bb::device::VibrationController::qt_metacast(char const*)'
    o.le-v7-g/.obj/main.o:(.data.rel.ro._ZTVN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE[_ZTVN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE]+0x10): undefined reference to `bb::device::VibrationController::qt_metacall(QMetaObject::Call, int, void**)'
    o.le-v7-g/.obj/main.o:(.data.rel.ro._ZTIN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE[_ZTIN19QDeclarativePrivate19QDeclarativeElementIN2bb6device19VibrationControllerEEE]+0x8): undefined reference to `typeinfo for bb::device::VibrationController'
    o.le-v7-g/.obj/main.o: In function `~QDeclarativeElement':
    c:/bbndk/target_10_3_1_995/qnx6/usr/include/qt4/QtDeclarative/qdeclarativeprivate.h:91: undefined reference to `bb::device::VibrationController::~VibrationController()'
    c:/bbndk/target_10_3_1_995/qnx6/usr/include/qt4/QtDeclarative/qdeclarativeprivate.h:91: undefined reference to `bb::device::VibrationController::~VibrationController()'cc: C:/bbndk/host_10_3_1_12/win32/x86/usr/bin/ntoarm-ld caught signal 1
    Makefile.Debug:103: recipe for target 'o.le-v7-g/headlessTest' failed
    make[2]: *** [o.le-v7-g/headlessTest] Error 1make[2]: Leaving directory 'D:/BB-dev/momentics-workspace/headlessTest/arm'
    make[1]: *** [debug] Error 2
    Makefile:50: recipe for target 'debug' failed
    make: *** [Device-Debug] Error 2make[1]: Leaving directory 'D:/BB-dev/momentics-workspace/headlessTest/arm'
    mk/cs-base.mk:31: recipe for target 'Device-Debug' failed
    08:44:31 Build Finished (took 1s.47ms)
    

    I give up!

    Why adding simple code can be a problem? Please help me!

    Thank you very much!

    You must add this code into main.cpp to your HeadlessApp, not HeadlessAppService. Your spare part cannot run any UI stuff, trying to save an object any for QML is part of the things in the user interface.

    But anyway, reading your newspaper from the console, you seem to put in the right place anyway. Did you add this to your headlessTest.pro file:
    LIBS +=-lbbdevice

  • Citing the part of the user interface of the game without head in an app without head

    Hello

    I try to call my interface section user app without head of service class (part long term without a head), as shown below:

    application of BB::System:InvokeRequest;

    request.setTarget ("com.myDomain.myAppName");

    request.setAction ("com.myDomain.myAppName.START");

    InvokeTargetReply * response = m_invokeManager-> invoke (request);

    {if (Reply)}

    QObject::connect (response, SIGNAL (finished (()), this, SLOT (onInvokeResult ()));

    _invokeTargetReply = response;

    }

    else {}

    qDebug()< "failed="" to="" start="" invocation:="">

    }

    the error response is always "not objective". I double checked that the id of the target is my id app (user interface section) and that it is registered as target to call in the xml file bar


    application
    myAppName

    Icon.PNG

    myAppName

    I don't know why he keeps giving me the error response target?

    Made a typo, the Notification and NotificationDialog are part of the bb: platform.

    Here are their respective documents:
    Notification https://developer.blackberry.com/native/reference/cascades/bb__platform__notification.html#function-...

    NotificationDialog https://developer.blackberry.com/native/reference/cascades/bb__platform__notificationdialog.html#fun...

  • Problem with app without head

    I have an app without very simple head with a spare part which can be summed up like this:

    int main()

    {

    While (true)

    {

    appendToLogFile();

    Sleep (5);

    }

    }

    He manages to write twice in the logfile on Simulator 10.3 after the system starts and then it dies (nothing is printed, process went from "pidin").

    Is there something I need to do to ensure that the system does not not kill us after a few seconds?

    I have the following 2 lines in bar - descriptor.xml:

    _sys_run_headless

    _sys_headless_nostop

    I can zip from the project and set up somewhere if anyone wants. It is based on the project template that Momentics puts apps headless.

    TIA.

    I did some experiments. It seems that headless apps work pretty much as advertised during the development of a device but not very well at all in the development on the Simulator.

    Use a device to develop applications without head, not the Simulator.

    Perhaps future simulators will correct the current problems.

  • The App without head - account provider not found - release form is linked to the Blackberry ID

    Hello

    I tried to fill out the app without head permission to

    https://developer.BlackBerry.com/jam/headless/

    It gave me an error "not found the vendor account. Before, visit the provider Portal to create an account or link an existing account on the portal provider with this BlackBerry ID. »

    My account is already linked, and I am able to connect to the provider portal using my blackberry id.

    Please notify

    Worked ok now.

  • When I use pim/message lib in an application without a head at this time I have error

    Hi all

    Today, I try to compile the app for the incoming and outgoing sms watch but fatch some problem.

    It works very well in waterfall app but when I try to put implementing in an application without a head at this time, I get the error.

    I joined code of Cascade and Headless request please check and let me know what I need to change.

    Note :-work fine waterfall Soft code that works when the service error part it does not work.

    Hi Doturner,

    Thanks for the reply.

    I'll try to understand my problem as soon as possible, but some time I need to complete the project on time so when you do that, I have attached code according to the referance.

    Why I joined 2 code?

    -J' developed an application without head and this problem occur after I use the SMS api works pretty well. So I put 2 code code 1 and 2 work without labour code.

    Structure of headless service created by BlackBerry IDE and file name of the service being built. So I m confused and I have no idea is the headless application error or my mistake,

    What ever thank you once again, I'll check and if I need help and then I take the new query

Maybe you are looking for

  • Display driver for hp split x 2 13-m101se

    Hello, I recently bought the hp x 2 13-m101se split. I noticed the battery drain to be fairly high, most after upgrading 8.1 Win. Previous forums were suggestions to turn OFF bluetooth, what I did, and to download the latest drivers from HP display.

  • Lenovo Slim Portable USB DVD drive burner does not work

    I had previously portable Slim USB DVD burner, and it worked perfectly with a Thinkpad, I had. However, the device doesn't seem to work with my new Lenovo twist (s230u). There is absolutely no response from the computer. I checked the DVD and it work

  • HP Mini 110-1030NR: password power

    My brother password protected the boot CNU9214KPX

  • My rank of war gear 3 has been reset on the xbox live

    Yes, I a question.i play gears of war 3, and im a rank 20 yesterday I came home and turned on my xbox360 when I signed to and went to gears of war 3 got rank reset to level one, are the only thing I have my: campaign levels, my arms imulsion pack and

  • I can't install Windows Virtual PC on my computer Windows 7 Home Premium

    I have problems to install the update to Windows Virtual PC on my Windows 7 computer. I checked and have met the criteria for Virtual PC (I do not wish to install XP Mode), but the update will not let me install Virtual PC. I get the message "this up