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
Tags: BlackBerry Developers
Similar Questions
-
Is there anyone who knows how to implement the P3 Colorspace in first CC2014?
Is there anyone who knows how to implement the P3 Colorspace in first CC2014?
Hi RVBBernard,
Sorry, there is currently not available in Premiere Pro. You can request a feature here: http://adobe.ly/feature_request
Thank you
Kevin
-
After trying to fix the error of time synchronization by typing net start w32time that receipt of the message in the title. In addition, type net stop w32time responded that the service was not working.
Original title: the executable that this service is configured to run does not implement the service
After checking the configuration in the registry and check or update if necessary from the link below:
Then the time errors that I got from the command prompt window:
Order--> net stop w32time & net start w32time
Response--> The Windows Time service is not started.Order--> net start w32time
Response--> system error 1083.
The executable program that this service is configured to run in does not implement the service.--> Command w32tm/Resync /rediscover
Response--> sending command to local computer resync...
The following error occurred: the RPC server is unavailbale. (0x800706BA)Hi Mitchell_G,
Thank you for keeping us posted.
The steps of items offered in the previous post?
We know if you need help. We will be happy to help you.
Thank you.
-
I discovered that Windows defender is disabled. I tried to turn it back on, and he said that there is an error. How can I turn it back on? Anyone with information would be a great help. How to start the service manually? __
Hellocould a. you give us the exact error that you are experiencing?
(b) also mention the error code, as well if it is listed.
have c. you installed other software security like McAfee, Microsoft Security Essentials etc. ?
Let us check if the service is set to automatic.1. Click Start-> run and type services.msc
2. now, locate the service named Windows Defender,
3. double click to bring up the Properties window.
4. set the startup type to automatic
5. click on apply, and then click Start
6. click OK, and then click Close window Services/LocalWe hope to hear from you soon.Thank you, and in what concerns:
Shekhar S - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly. -
How to implement the AdSense code
Hello
I don't know how to implement the code.
Can someone help me?
Hello
Please take a look on the link adobe form at the address below. This could help you.
https://forums.Adobe.com/message/4325647
Kind regards
Nitin Kapila
-
How to implement the process Train in Jdev 10.1.3
Hello..
Anyone know where to find a tutorial on how to implement the process train in jdev 10.3.1
Thank youhttp://download-West.Oracle.com/docs/HTML/B25947_01/web_complex005.htm#CEGIGJID
-
How to implement the ScreenUiEngineAttachedListener Interface?
How to implement the ScreenUiEngineAttachedListener Interface? It is somewhat a mystery reading through the API.
I have a class that implements ScreenUiEngineAttachedListener:
public class UiListener implements ScreenUiEngineAttachedListener { public void onScreenUiEngineAttached(Screen screen, boolean attached) { } }
Then I have a class MyScreen which extends from screen and has two methods:
public void addScreenUiEngineAttachedListener(ScreenUiEngineAttachedListener listener) { super.addScreenUiEngineAttachedListener(listener); } private void removeScreenUiEngineAttachedListener() { }
- What is the correct positioning of everything?
- Can I define an instance of UiListener and pass in the addScreenUiEngineAttachedListener?
- How to remove UiListener in removeScreenUiEngineAttachedListener?
You will need:
- an instance of your UiListener - probably a static member inside your UiApplication;
- a method that allows to retrieve the reference to this instance of UiListener;
- a call in your constructor for the screen at addScreenUiEngineAttachedListener (yourApplication.getUiListener ()) or similar;
- potentially a call within your onScreenUiEngineAttached (attached screen, boolean) routine, the branch (attachment is false) : screen.removeScreenUiEngineAttachedListener (this);
However, all this is too much work for no gain. Just override protected void onUiEngineAttached (boolean attached) in your screen class and make your logic there - all members of your class are accessible and all the code is placed where it belongs.
-
How to implement the SOA 11 g limitation?
Hi all
Can someone tell me how to implement the limitation in SOA to create a repository for the history of the transactions?
ARO
Hari
Hello
By Greg Mally of Oracle message covers an approach to the limitation in SOA Suite
https://blogs.Oracle.com/soacommunity/entry/throttling_in_soa_suite_via
-
How to control the service console in ESX?
How to control the service console in ESX?
http://www.Petri.co.il/5-critical-VMware-ESX-CLI-network-commands.htm
http://download3.VMware.com/VMworld/2006/mdc9694.PDF
http://download3.VMware.com/VMworld/2006/mdc9807.PDF
http://download3.VMware.com/VMworld/2006/tac0028.PDF
http://download3.VMware.com/VMworld/2006/tac9689-b.PDF
http://download3.VMware.com/VMworld/2006/labs2006/VMworld.06.Lab04-performance-manual.PDF
PS: If you have found useful messages then please leave a few points
André
-
How to start the service in order
Hello
I'm new to Hyperion.
Can someone tell me how to start the service for HFM, planning and Essbase?
Thanks in advance...
HanPlease read the following document:
http://download.Oracle.com/docs/CD/E12825_01/EPM.111/epm_install_troubleshooting.PDF -
How to change the angle of a gradient layer without changing anything else?
How to change the angle of a gradient layer without changing anything else?
When I try it myself my gradient everything turns black.
To add to the above, you can just set the angle. If you want to use other existing parameters, you need to get from the layer. The code in this other thread shows a way to get them.
But if you do not have the values for any other reason, you can get the handle to the layer, make a duplicate of it with all the settings and just crush those you want to change.
It is a way to just change the angle while keeping the other existing settings.
// helper function for working with descriptors function getProperty( psClass, psKey, index ){// integer:Class, integer:key var ref = new ActionReference(); if( psKey != undefined ) ref.putProperty( charIDToTypeID( "Prpr" ), psKey ); if(index != undefined ){ ref.putIndex( psClass, index ); }else{ ref.putEnumerated( psClass , charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) ); } try{ var desc = executeActionGet(ref); }catch(e){ return; }// return on error if(desc.count == 0) return;// return undefined if property doesn't exists var dataType = desc.getType(psKey); switch(dataType){// not all types supported - returns undefined if not supported case DescValueType.INTEGERTYPE: return desc.getInteger(psKey); break; case DescValueType.ALIASTYPE: return desc.getPath(psKey); break; case DescValueType.BOOLEANTYPE: return desc.getBoolean(psKey); break; case DescValueType.BOOLEANTYPE: return desc.getBoolean(psKey); break; case DescValueType.UNITDOUBLE: return desc.getUnitDoubleValue(psKey); break; case DescValueType.STRINGTYPE: return desc.getString(psKey); break; case DescValueType.OBJECTTYPE: return desc.getObjectValue(psKey); break; case DescValueType.LISTTYPE: return desc.getList(psKey); break; case DescValueType.ENUMERATEDTYPE: return desc.getEnumerationValue(psKey); break; } }; function duplicateDescriptor( descriptor ) { var newDescriptor = new ActionDescriptor; newDescriptor.fromStream( descriptor.toStream() ); return newDescriptor; }; function localizeDescriptor( desc ) { var stream, pointer, zStringLength, zstring, localized_string, newZStringLength, previousStream, followingStream, newDesc; stream = desc.toStream(); while( true ) { pointer = stream.search(/TEXT....\x00\$\x00\$\x00\$/); if( pointer === -1 ) { break; } zStringLength = getLongFromStream( stream, pointer + 4 ); zstring = readUnicode( stream.substr( pointer + 8, ( zStringLength - 1 ) * 2) ); localized_string = ( localize( zstring ) ) + '\u0000'; newZStringLength = localized_string.length; previousStream = stream.slice( 0, pointer); followingStream = stream.slice( pointer + 8 + zStringLength * 2); stream = previousStream.concat( 'TEXT', longToString( newZStringLength ), bytesToUnicode( localized_string ), followingStream ); } newDesc = new ActionDescriptor(); newDesc.fromStream( stream ); return newDesc; }; function getShortFromStream( stream, pointer ) { var hi, low; hi = stream.charCodeAt( pointer ) << 8 ; low = stream.charCodeAt( pointer + 1 ); return hi + low; }; function getLongFromStream( stream, pointer ) { var hi, low; hi = getShortFromStream( stream, pointer) << 16; low = getShortFromStream( stream, pointer + 2); return hi + low; }; function readUnicode( unicode ) { var string = ""; for( i = pointer = 0; pointer < unicode.length; i = pointer += 2) { string +=String.fromCharCode( getShortFromStream( unicode, pointer ) ); } return string; }; function longToString( longInteger ) { var string; string = String.fromCharCode( longInteger >>> 24 ); string += String.fromCharCode( longInteger << 8 >>> 24 ); string += String.fromCharCode( longInteger << 16 >>> 24 ); string += String.fromCharCode( longInteger << 24 >>> 24 ); return string; }; function bytesToUnicode( bytes ) { var unicode = "", char_code, charIndex; for( charIndex = 0; charIndex < bytes.length; charIndex ++ ) { char_code = bytes.charCodeAt( charIndex ); unicode += String.fromCharCode(char_code >> 8 ) + String.fromCharCode( char_code & 0xff ); } return unicode; }; function setGradientAdjustmentAngle( angle ) { var adjustmentDesc = getProperty( charIDToTypeID("Lyr "), charIDToTypeID( 'Adjs' ) ).getObjectValue(0); var newAdjustmentDesc = duplicateDescriptor( adjustmentDesc ); newAdjustmentDesc.putUnitDouble( charIDToTypeID('Angl'), charIDToTypeID('#Ang'), angle ); var desc = new ActionDescriptor(); var ref = new ActionReference(); ref.putEnumerated( stringIDToTypeID('contentLayer'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') ); desc.putReference( charIDToTypeID('null'), ref ); desc.putObject( charIDToTypeID('T '), stringIDToTypeID('gradientLayer'), newAdjustmentDesc); executeAction( charIDToTypeID('setd'), desc, DialogModes.NO ); }; var newAngle = 45; setGradientAdjustmentAngle( newAngle );
-
How to get the device model, for example app works on PlayBoook or BlackBerry 10?
How to get the device model, for example app works on PlayBoook or BlackBerry 10?
You can use this class: http://goo.gl/GtMLP for information on devices
something like this:
String myDeviceModel = android.os.Build.MODEL; String myDeviceBrand = android.os.Build.BRAND; String myDeviceDevice = android.os.Build.DEVICE;
-
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 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:
- created a new application without head the wizard project
- created a new library shared by using the wizard project. Adds a simple C++ (Qt not) class
- 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.
- 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:
-
Any idea on how to implement the discussions threaded for physical record in URM.
I have a requirement of implementation of the functionality of dicussion threaded for physical records in URM. It is currently only available for electronic records only.
Thank you
Vanina
We finally reached by taking the output of the component box discussion threads and rename all the services, change some db queries (since all the material metadata element are present in different tables) and also by the way dSource = physical parameter so that the system makes a distinction between electronic and physical records. Also I am not suggesting to ovveride resources of the existing component rather get all resource definitions in your new device. This will eliminate the dependence between two components, and each will work independently.
Maybe you are looking for
-
Satellite C660 - 1 DG-drivers of Windows Server 2012
I started Windows Server 2012 (for development purposes). Now... where can I find the drivers? * display driver *-lets start with the display driver (for the Intel Graphics Media Accelerator HD) when I look for the display driver in the support forum
-
Good afternoon. I use a C library for programming an application in Labview (I use the call library function). The problem is that I need enter a NULL value as an argument within the function. Someone can tell me, how do I create a digital constant N
-
configuration of the copy Max locks RT
There are about 33% chance of my RT lock when I try to export an .ini file using Max Configuration.vi of copy on my host. Status of the RT in pharlap watch display always a charge permanent CPU 80% and 20% on his two sons, once he's locked up. If i
-
OK, some background on me, just to avoid some types of questions: I'm not an expert in huge windows, but I use it as my office like a bit of a user with power for 10 years, and I've been a professional Unix administrator since almost 15 years; I'm pa
-
Hello. I have HP dv6753 laptop cl downgraded to XP and I can not find some drivers for it. here some info about this features: Base system device PCI VEN_1180 & DEV_0592 & SUBSYS_30CC103C & REV_12 PCI VEN_1180 & DEV_0592 & SUBSYS_30CC103C PCI VEN_118