Call the function in the UI part without head

I develop some app with no head.

When I change the code in the head part and build - launch. But nothing changes in the part without a head.

I have another solution call the function in the UI part headless. But whatever it is called.

Please help me solution?

The part without head of a long walk without head application is still running in the background. It will not update until you stop the part without a head.

To stop the game without leading the race, you have three choices:
(1) build increment in the bar file version - descriptor.xml. This will force the part without head to stop and restart with the new code.

(2) use the monitor of the device to manually stop your application from running. Then, new launch and your game without head will run the new code.

3) to implement your own way without a head, like a button that would send a personalized call to headless with (say) action "com.myDomain.myAppName.SHUTDOWN" and when headless receive this invocation, operate you this line:
BB::application::instance()-> quit()
This will make the part without head stop, then you run and your part without head will take place the new code.

I prefer the #3 method, but if you do, don't forget to hide this feature before releasing to the public.

Tags: BlackBerry Developers

Similar Questions

  • No access in the database in the part without head

    Hi Experts,

    I use Sqlite database App. App works very well in the foreground.

    But when trying to access the same database in part without a head it is said table is not output.

    Please suggest where I am absent...

    Thank you & best regards

    We use the same database in both headless and UI without problems
    (other than those described in http://supportforums.blackberry.com/t5/Native-Development/Using-sqlite-database-from-headless-and-ma...

    You may click on the link above and share your application if it is different?

  • 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

  • Equivalent of VCS to call the Transformation part mask in the CUCM

    I'm changing the ID of group calling using a VCS.  This can be done easily with a CUCM by creating a road model and using the 'mask of Transformation part of the call.  Anyone know how to do this same thing via a VCS?

    Hi Rachel,

    This message can help - https://supportforums.cisco.com/thread/2128626 because he has a few suggestions.

    Thank you

    Guy

  • Can headless part of the application calls a function QML?

    Normally, when you write code in c ++ in the part of the user interface of the code, I am able to call the function of any file QML by writing the code below.

    QmlDocument *qmldoc = QmlDocument::create("asset:///Functions.qml");
    AbstractPane *root = qmldoc->createRootObject();
    QMetaObject::invokeMethod(root, "printResult");
    

    In headless of demand, I create another qml file, called "NotificationHandler.qml" in the current folder of the game without head. In one of the file c ++ without head when I write the same thing, it gives an error indicating that

    C:/bbndk/target_10_3_0_698/qnx6/usr/include/bb/cascades/resources/qmldocument.h:366: undefined reference to `bb::cascades::QmlDocument::QmlDocument(QUrl const&)'
    

    Below, you will find all the code inside the service.cpp which is the game file without the application head.

    #include "service.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    #include 
    
    using namespace bb::cascades;
    using namespace bb::platform;
    using namespace bb::system;
    
    Service::Service() :
            QObject(),
            m_notify(new Notification(this)),
            m_invokeManager(new InvokeManager(this))
    {
        m_invokeManager->connect(m_invokeManager, SIGNAL(invoked(const bb::system::InvokeRequest&)),
                this, SLOT(handleInvoke(const bb::system::InvokeRequest&)));
    
        NotificationDefaultApplicationSettings settings;
        settings.setPreview(NotificationPriorityPolicy::Allow);
        settings.apply();
    
        m_notify->setTitle("NotificationWork Service");
        m_notify->setBody("NotificationWork service requires attention");
    
        bb::system::InvokeRequest request;
        request.setTarget("com.example.NotificationWork");
        request.setAction("bb.action.START");
        m_notify->setInvokeRequest(request);
    
        onTimeout();
    }
    
    void Service::handleInvoke(const bb::system::InvokeRequest & request)
    {
        if (request.action().compare("com.example.NotificationWorkService.RESET") == 0) {
            triggerNotification();
        }
    }
    
    void Service::triggerNotification()
    {
        qDebug() << "first";
    
        QmlDocument *qmldoc = QmlDocument::create("asset:///NotificationHandler.qml");
        AbstractPane *root = qmldoc->createRootObject();
        QMetaObject::invokeMethod(root, "startNotificationService");
    
        qDebug() << "second";
        // Timeout is to give time for UI to minimize
        // QTimer::singleShot(2000, this, SLOT(onTimeout()));
    }
    
    void Service::onTimeout()
    {
        Notification::clearEffectsForAll();
        Notification::deleteAllFromInbox();
        m_notify->notify();
    }
    

    I use the same logic, but apparently it is forbidden to treat the QML files in without the request or I have made a serious mistake. Could you please help?

    I thank very you much.

    usually the part without head does not reference libraries of stunts because they have a serious memory footprint.
    The part without being limited in memory head, which gives it its own UI isn't usually a good idea.

  • [ADF, JDev12.1.3] Why dynamic region is not spend if I re - call the currently displayed workflow?

    Hallo,

    I have a page with a dynamic region that is managed by a range backingBean bean.

    Functions "startBtf...". "are called when a menu item is clicked.

    The workflow as BTF3 is called by two different functions and each function passes a different value (used by a component of router) to the workflow through the hash table.

    The problem is that startBtf3_Search is called after the startBtf3_Create (and vice versa) the dynamic region is not updated.

    How can I solve this problem?

    Thank you

    Federico

    public class MainDynamicRegion {
      private HashMap parameters = new HashMap();
    
      public MainDynamicRegion() {
      }
    
      public TaskFlowId getDynamicTaskFlowId() {
        AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
        String currentTaskflowId = (String) adfFacesContext.getPageFlowScope().get("CurrentTaskflowId");
        if (currentTaskflowId == null || currentTaskflowId.trim().equals("") == true) {
          currentTaskflowId = "/WEB-INF/empty-btf.xml#empty-btf";
          }
        return TaskFlowId.parse(currentTaskflowId);
      }
    
      private void setCurrentTaskflowId(String currentTaskflowId) {
        AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
        adfFacesContext.getPageFlowScope().put("CurrentTaskflowId", currentTaskflowId);
      }
    
      public void startBtf1(ActionEvent actionEvent) { 
        this.setCurrentTaskflowId("/WEB-INF/btf-1.xml#btf-1");
        this.parameters.clear();
      }
    
      public void startBtf2(ActionEvent actionEvent) { 
        this.setCurrentTaskflowId("/WEB-INF/btf-2.xml#btf-2");
        this.parameters.clear();
      }
    
      public void startBtf3_Search(ActionEvent actionEvent) {
        this.setCurrentTaskflowId("/WEB-INF/btf-3.xml#btf-3");
        this.parameters.clear();
        this.parameters.put("mode", "S");
      }
    
      public void startBtf3_Create(ActionEvent actionEvent) {
        this.setCurrentTaskflowId("/WEB-INF/btf-3.xml#btf-3");
        this.parameters.clear();
        this.parameters.put("mode", "C");
      }
    
      public void setParameters(HashMap parameters) {
        this.parameters = parameters;
      }
    
      public HashMap getParameters() {
        return parameters;
      }
    }
    

    The workflow as BTF3 is called by two different functions and each function passes a different value (used by a component of router) to the workflow through the hash table.

    The problem is that startBtf3_Search is called after the startBtf3_Create (and vice versa) the dynamic region is not updated.

    How can I solve this problem?

    You call the taskflow even without leaving the previous.

    To update the workflow, you have several options:

    -Give taskflow refresh 'ifNeeded' parameter and change the value of the input parameter (unfortunately, it is not applicable to your usecase because you use the parameter mapping and not point settings so setting change cannot be detected)

    -use the property RefreshCondition

    For more details, see: 23 by using task flows in regions (12 c (12.1.3))

    BTW,

    currentTaskflowId = "/WEB-INF/empty-btf.xml#empty-btf";
    

    Instead, you can change the return type for getDynamicTaskFlowId() to a string and use an empty string ("" ") instead of emptying the BTF (and in this case you don't need even of TaskFlowId.parse (part)).

    Dario

  • call the statement box inside the case statement

    I am writing a program which requires me to run a statement box inside another case statement. Although this sounds like a simple thing, I need to be able to call the case statement using a sequence structure, where s1 sends the true value to the case, s2, a fake. Then I need to record the results of this instruction box in a text file. Attatched is a simplified version of what I'm trying to do. Please note that the way my program runs may not call the case statement without using a sequence structure, two nesting box instructions is not feasible. I hope someone out there can help me because I was stuck trying to find this for awhile.

    Thank you

    LVStudent wrote:

    [...] I can't call the case statement without using a sequence structure

    Yes you can.  You just need to be smart.

    LVStudent wrote:

    I don't think I can use a state machine to fix this.

    I think you probably can.

    With respect to your original post. What are these s1 and s2 are you talking about?  My opinion on the matter, it is that you want to select a case based on the values of several controls Boolean.  If this is correct, I do this:

    Build your Boolean controls in a table, convert the table number and insert it into the structure of your business.  No button pressed = 0, s1 = only 1, s2 = only 2 both = 3.   This works for Boolean values as much as you want and is an easy way to make a decision that depends on many entries.

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

  • Translation in part without an application head

    I can't do the translation work in the part without head of my application, it works very well in the part of the user interface (for QML and RPC), but without head will not work.

    The ts file is filled in part without a head, I added the translation in the same way that I did for a part of the user interface, even tried with Qt Translator, but nothing seems to work. I even tried to add class QTranslator except headless and all associated code, still no luck, notifications of hub are not translated and all in the PRC with tr() line appears in the file ts, but just will not translate.

    I started the project in a project without empty head in Momentics, so everything should already work, no?

    Any idea?

    Here is a good solution, I did a blog post to explain a little more.
    http://www.bbdevchallenge.com/Uncategorized/how-do-you-say-headless-in-French/

  • Memory, databases and applications without head

    I've been struggling with this problem for some time now so let's go.

    As many of you know headless apps allowances of bunch of limit of 3 MB, which is fine, except when using Qt/Cascades objects that don't care much to consumption of memory, two examples are QNetwork and QtSql, who will blow easily your budget of memory in a single operation.

    I have simple ' SELECT * from Table' queries that consume more than 6MB, which then effectively disables the component without a head. More precise, I do the query the heap more than it consumes. So I tried libsqlite3, results were similar. It was however the promise to provide a chunck of mmap would or memory of static array for substitute of the bunch, but I can not:

    sqlite3_config(SQLITE_CONFIG_HEAP,...)

    to work correctly, it returns an error (1) every time.

    Unfortunately, I'm at the point where it seems that a component without head who uses SQL can be impossible with the current memory limit. Can anyone offer a solution to the use of SQL with headless while maintaining a service that runs reliably?

    -Are there when even to provide a static heap memory for QtSql use?

    -Are there a way to limit the memory used by QtSql?

    Thank you!

    EI

    The solution was to restructure my database, as awkward as this has been significantly reduced the memory required for the information necessary to satisfy the query of data in the buffer. In others, rather than have a huge database of the 8 column I broke it into several two databases colum - when the part without head wants just a little information is exactly what he will get so surprise elimination memory usage spikes.

    The problem still exists: as the database develops for a query memory requirements. Has no way to control the maximum limits memory use for QtSql complicating an app without elastic, even theoretically impossible to write head.

    EI

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

  • Call functions of qml in main.qml of a part of the user interface of the part without application head.

    Hi all;

    I wanted that my application runs in the background (Headless) but first encountered several problems, calculation are qml functions (in main.qml: updateUi() with call javascript *.js files), who should I call their headless part when the part of the user interface is closed by the user? Please help me if you have any solution.

    Thank you very much.

    identify what treatment you need for the game without head and migrate to c + c++ / Qt.

  • Call the function in LabView from a DLL, and then access the global variable of DLL

    I've created a DLL in LabWindows with a function and structure.  I want to call the function from LabView and then access the overall structure.  I am able to call the function in the DLL with a "call library function node" and has access to the return value, but I can't understand how to access the overall structure.  The structure is declared in the header DLL with __declspec (dllimport) struct parameters file.

    Is it possible to access this structure without using the library of network variables?

    My guess is that you need two bytes of padding after "in_out" and another to two bytes of padding after "anin."  The reason being that ints are 4 bytes, and most of them C compilers will align on 4-byte boundaries.  The struct will naturally start to such a limit (in fact, in Windows, it will probably start to an 8 byte boundary).  If you then count bytes in your structure, you are 70 byte after "in_out."  70 is not divisible by 4, so you need 2 bytes more to reach the next 4 byte boundary.  You can also you could reorganize your struct so that "anin" follows "in_out" and this is probably the best option if it won't cause you other problems.

    Unlike most C compilers, LabVIEW compressed structures as closely as possible, without filling.  I don't know enough about the history of LabVIEW and internal parts to explain the reasons and to do this performance penalty, but, as choice of LabVIEW "endianness", it is probably a remnant of the first versions of LabVIEW that were running on the Mac.

    If for some reason you want to force your C struct to match package LabVIEW, you can use the #pragma pack (x) directive, but I wouldn't recommend that here because you can control the C and LabVIEW.

    EDIT: in the cases where it was not clear, add padding to your cluster of LabVIEW, insert appropriate size or items at the place desired in the cluster.

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

  • Error 7 only during the executable to call the library node function

    Hello

    I'm having some trouble with LabVIEW, creating an executable work of my application. The program communicates with a sensor of moving laser Keyence LK-G5000 series with drivers provided by Keyence. When you run the program in the development environment, the program runs without any problem. However, when the construction program and run the program with an executable file, the program generates error 7 as shown below:

    After looking through the previous posts on error 7 and executable environment on the forums AND I found that a lot of people mentioned that the development environment and runtime environment use different path structures. I also found a guide of NOR to solve this problem here:

    http://digital.NI.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363

    However, after following these instructions, I always get error 7 only when executing the program in an executable environment.

    I've never used any .lvlib library in the past before, so I don't know if this may have been the issue (it was provided by Keyence.) The library includes 2 private screws that can only be called within the library, so I don't think I can go without using the library. There are screws in the library that use the DLL files (which are also included in this same library) through the node library function call in LabVIEW that appear not to be included when I create an executable file. Adding even manually the DLL files to the folder where the executable generates the same error 7.

    Is this what I remember in my code to allow the program to function within the executable?

    Fasteners are drivers for Keyence, my top level VI (GeoREF-Keyence controller.vi) and all my sub live

    Best regards

    Victor

    Executables are taking a different path, as a start to debug the path as an indicator and see which path is being planned in executable mode?

Maybe you are looking for