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.

Tags: BlackBerry Developers

Similar Questions

  • 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

  • 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.

  • 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.

  • 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.

  • 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 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

  • WebWorks app with part without head

    I'm devolopping a webworks SDK-based application.

    I want to develop a plugin that communicate with a native service without a head.

    I used the sample of The Headless Service sample that shows how to create a long service life without a head.

    Also, I used the model of the creation of a plugin of cordova for communication between JavaScript and native part.

    2 samples of separately work fine, I have not found how to configure make them work together. I mean How to invoke the service without a head form Javascript side.

    As BlackBerry Webworks Extension Native and native headless service project have the same structure of project, I don't have how to configure my Webworks and my native project without head to communicate with each other.

    Help please?

    Hello

    WebWorks 2.1 has a «create headless» CLI command This operation generates a sample application in which the momentics project built directly in the project WebWorks. It illustrates invocation of WebWorks for headless.

    http://developer.BlackBerry.com/HTML5/documentation/v2_1/creating_a_ww_app_with_headless_app.html

  • problem with app store

    I get the message about a problem with a previous purchase on the app store. I changed my payment information and I bought a $20 iTunes card and bought it. The iTunes card has another $20 on it, and my new debit card is refused. I don't know what else to do. Help please!

    Contact iTunes supports for assistance. https://www.Apple.com/EMEA/support/iTunes/contact.html

  • Problems with App: can't see App Store, allow me to d/l any app on iPad 2

    Problem 1: Having so much trouble to get the app I can't see or open the App Store on my ipad 2, and it won't allow me to d/l or update of any application. I use iOS iPad 2 already updated 9.2. I have no problem with email or Internet surfing on ipad 2 - it just won't let me access my App Store (can not d/l and update or the other). This problem began last week, just after I have updated to the new version of iOS 9.2. What is a typical problem? hope someone can help me. Thanks in advance!

    Problem 2: I also have an iPad 1 (Yes, old device - but still in very good condition lol). Still once, troubles me in obtaining new iPad App (1st generation) repeat my "software is up-to-date" iOS 5.1.1 that can not be true because iOS 9.2 is available... but I could not get the update of the software on the iPad 1 and therefore can not d/l brand new application since most app requires iOS 8 or a later version.  Help please!

    (I hope that you suggest buy new iPads - I prefer to use ipad1 or ipad2, instead of forking out extra money on new devices, the less do not now)

    Problem 1. Go to settings > general > restrictions and do it on no restrictions are enabled.

    Priblem 2. IOS 5.1.1 is the highest upgrade for an iPad 1. Many applications offer legacy versions. Download applications that require IOS 8 or more.

  • 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/

  • OfficeJet Pro 6835: Problem with the print head - Oxc19a0003

    Just bought the Pro Officejet 6835 this month of April and now the print screen shows "Oxc19a0003, there is a problem with the printhead". Had tried a hard reset of the e power cord does unplugging and is still showin the same error. Can't find a number of HP support, I can call or chat online. Help, please!

    Hello

    Its unfortunate to see this error on a new pritner.

    The error appear while you were setting up the printer for the first time, before installing the ink? (Yes/no)

    The error appear while you have been putting in place of the printer for the first time, after installation of ink? (Yes/no)

    Can I know if you had printed a few pages before the error appeared? (Yes / no)

    The error appear as soon as you switched on the printer? (Yes / no)

    However, please call HP Technical Support for assistance.

  • Problems with App Store

    I was gifted with a very old iPad (I think that generation 1) and its max OS is 5.1.1. I asked for the iPad to play a game that is not sync with the cloud that I had saved on the tablet. The app now needs an update, but even if I went to App Store IDs, previous ID password the password confirmation popup request. How can I change this? I know I went Apple ID so why is the App Store either stuck on the old ID or simply does not accept my new one? Restart the iPad would help? I'm afraid to do because the game could be deleted. Help, please. Thank you!

    EDIT: I went to bought and because apps there are indeed my own apps, which means that the Bank has accepted my ID. He always asks that I put in the original ID password well. The game in question is in conflict of Clans(and I didn't save it to Game Center because I knew previously that I didn't want to have to keep my parent's Game Center to continue playing). Require the old ID because the app was bought on another account? I can download other applications with my ID but I can't update. If I delete the app and rebuy the game account saved?

    You must connect using the Apple that was originally used to purchase or download the game ID. Purchases are always related to this ID, they cannot be "moved" to the new account.

  • Problem with app painted super-simple paper setting

    I have a simple application, where I'm putting the wallpaper. It was based on the example of Web-works on Github, but instead of using a user supplied photo I use one that is packed in the app.

    Simple I have a button that when clicked calls the following function.

    function setPaper() {}
    blackberry.system.setWallpaper('img/img1.jpg');
    BlackBerry.UI.Toast.Show ("painted paper Set");
    };

    I've posted simple on my Dropbox app if anyone can take a look and help, that it would be much appreciated!

    https://DL.dropbox.com/u/32351813/archive.zip

    Thank you

    P. S.

    I put the following in the config file





    <>ermissions >
    <>Ermit > access_sharedermit >
    <>Ermit > use_cameraermit >
    ermissions >

    Found this one.

    You need to refer to files with

    local: / / /.

  • Problem with app world blackBerry Smartphones / bb curve 8520

    Hello

    I have free wifi on bb 8520 curve, but I can not connect with messenger or app worl, it says that I am not connected to the network on the other side with the browser its ok

    Thank you

    Do you have a blackberry data plan on your account?

    http://www.BlackBerryFAQ.com/index.php/What_do_I_need_a_Data_Plan_for%3F

Maybe you are looking for