How to use the 'sensors' api?
Hi guys! I am a web-game developer but a beginner in developing blackberry applications.
I intended to create a star atlas application and I've already finished most but failed to use the 'sensors' api.
I referred to the example provided in the documentation of webworks 2.1 as below:
function compassCallback(data) { document.write("Current azimuth:"+data.azimuth); } blackberry.sensors.setOptions("devicecompass", { delay: 1000 }); document.addEventListener("devicecompass", compassCallback);
and I added an element in the config.xml file:
also, I added the plugin com.blackberry.sensors for the project.
But I still can't azimuth compass...
I really appreciate if someone could help me with this!
I solved this problem by myself.
The listener of the api should be placed in a "deviceready" event
Tags: BlackBerry Developers
Similar Questions
-
Can someone explain how to use the addProcessFormChildData API?
Hi gurus:
I have a scenario where; I need groups implemented in AD using AD connector as part of provisioning of the IOM to AD users. These Don t groups are already available in IOM, but these are received as parameters of authoritative source.
I read the different thread, but can not find how to use the addProcessFormChildData API to perform these forms of child.
Any help would be greatly appreciated!
PD: My English is very bad!Use this post
How to remove data from the user for the child form?
How to find the key to AD provisioning process instance
These will be useful.
-
How to use the Teststand API DisplayEditNumericFormatDialog method
Hello
I have to create a report for Teststand coustom generator plugin using c#. In the Teststand API is a built-in method called 'DisplayEditNumericFormatDialog '.
Is there a way to set the value of the sample of the window that appears if the method is called?
I do the following things:
private void button1_Click (object sender, EventArgs e)
{
mChanged = true;
bool tempbool;PropertyObject tempobject = mEngine.NewPropertyObject (PropertyValueTypes.PropValType_Number, false, "", 0); creates a temporary PropertyOgject to view the EditNumericFormatWindow
tempobject. NumericFormat = mConfig.GetValString (P_PluginSpecific_Options_NumericFormat, 0); read the digital format of the plugin options
tempobject. DisplayEditNumericFormatDialog ("Digital Format", out (tempbool), 1); View the EditNimericFormatWindowIf (tempobject. NumericFormat == "") mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, "%$.13g");
else mConfig.SetValString (P_PluginSpecific_Options_NumericFormat, 0, tempobject.) NumericFormat);MessageBox.Show (tempobject. NumericFormat.ToString ());
}Thanks in advance
Hello f4bo,
attached is a sequence that shows how this can be done.
Locals.Local = RunState.Engine.NewPropertyObject (PropValType_Number, False, "", 0x1),.
Locals.Local.AsPropertyObject.NumericFormat = "%b"
Locals.Local.AsPropertyObject.SetValNumber ("", 0, 20),.
Locals.Local.AsPropertyObject.DisplayEditNumericFormatDialog ("false title", False, 0) -
How to use the vStorage API?
Hi all
I heard that vStorage is a feature of vSphere 4.0 that can take backup of the virtual machine directly without using a Proxy VCB.
Does someone know how to use it? as far as I know only commercial 3rd party backup software can use it, do not use any script solution or freeware.
Kind regards
AWT
I've heard both sides of the story (even from VMware peeps)
(1) vStorage API is today essentially vSphere API + VDDK (e.g. change block tracking feature is in the new vSphere API, accessible using the SDK)
(2) vStorage API is reserved for VMware partners to develop 3rd party applications (not 100% sure on this subject, but I know that some people have said this)
Probably best to contact your VMware representative if you have any questions or interest in development on the vStorage API (probably why there not a forum on the vStorage API developers forum)
=========================================================================
William Lam
VMware vExpert 2009
Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
VMware Code Central - Scripts/code samples for developers and administrators
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
If you find this information useful, please give points to "correct" or "useful".
-
Hello
I want to use the CWGPIB component to control a GPIB device or spectrum.
The first thing is to find what peripheral GPIB is on the bus, but I don't know what given API can be used to analyze the device by feeding back of settings such as address.
Can someone help me?
Thank you very much
Hey JK,.
I found an article on the Delphi application using programs 488.2.
http://www.NI.com/white-paper/4873/en/
http://digital.NI.com/public.nsf/allkb/F6E5713B040699E38625630600554D79
I also found this http://www.ni.com/support/cw/cwtechspec.htm
It seems that Borland Delphi and C++ Builder support Not IVI ComponentWorks ActiveX controls
Because controls have been developed in Visual Basic (i.e., Delphi and C++ Builder do not support developed with Visual Basic ActiveX controls).
-
Workflow of vCO of query using the REST API in PowerShell
Hello
I am interrogating a workflow vCO by name using the REST API of PowerShell based on this article:
http://www.vcoteam.info/articles/learn-VCO/268-how-to-use-the-rest-API-to-start-a-workflow.html
$username = "XXXXXX".
$upassword = "XXXXXX".
$auth = $username + ':' + $upassword
$Encoded = [System.Text.Encoding]: UTF8. GetBytes ($auth)
$EncodedPassword = [System.Convert]: ToBase64String ($Encoded)
$headers = @{' authorization '=' basic $($EncodedPassword) ' ;}}
$body = "<-xmlns = execution context" ". ' http://www.VMware.com/VCO ' > < / execution context > '
#query for workflow named "donothing".
Invoke-RestMethod-uri https://XXXX:8281/api/flow /? conditions = name = donothing -Headers $headers - body $body - ContentType "application/xml" - Get method
Invoke RestMethod: failed to send a content-body with this type of verb.
On line: 1 char: 1
+ Call-RestMethod-uri https://XXXX:8281/api/flow /? conditions = name = donoth ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo: NotSpecified: (:)) [invoking-RestMethod], ProtocolViolationException)
+ FullyQualifiedErrorId: System.Net.ProtocolViolationException, Microsoft.PowerShell.Commands.InvokeRestMethodCommand
The request succeeds by using the customer REMAINS on Firefox, but I can't make it work on PowerShell. (NOTE: PowerShell workflow execution works very well)
Any help is appreciated.
Thank you
Juan.
OK, I managed to do work by removing
[System.Net.ServicePointManager]: ServerCertificateValidationCallback = {$true}
And add this at the beginning of the script
"Add-type @ '.
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy: {ICertificatePolicy
public bool CheckValidationResult)
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {}
Returns true;
}
}
"@
[System.Net.ServicePointManager]: CertificatePolicy = New-Object TrustAllCertsPolicy
Now I can use the GET method:
$ret = Invoke-WebRequest - uri $URL - Headers $headers - ContentType "application/xml" - Get method
I spent to Invoke-WebRequest so I can get the return of application Web.
Juan.
-
How do to identify the documents called "models of library" using the RESTful API?
How do to identify the documents called "models of library" using the RESTful API? Furthermore, what constitutes a document to be a "model of library"? I see nothing in the libraryDocuments RESTful documentation that describes this type of document, such as presented on the tab 'Manage' my developer account. Please see the screenshot below. There is a model of Document named "[DEMO ONLY] Test model" listed under "Library Templates" and I try to figure out which classifies that document to be included this way and how does produce a similar announcement by using the RESTful API.
Thank you!
Hello
You can connect to access library models using the REST API, use 'GET /libraryDocuments' allowing to recover documents in library for a user. Models are created in the account of EchoSign, which later are accessible via the REST method mentioned above.
Jat
-
How to find if there is a file using the FrameMaker API?
How do we find such a file (with pdf / GST file given path) is in force in a folder given using the FrameMaker API?
You can use the function F_FilePathProperty() FDK to check if there is a way (as a FilePathT). It also provides information about whether the path is writable, readable, is a directory or a file.
.. .Scott
-
How to send e-mails using the RIM api.
Hi all
My requriement, it's that I need to develop an application to send e-mail using only the RIM api. Please help me by sending an email using the RIM api. I use version 4.7.0.41 JDE
Through this Developer's Guide, Section, 'Integrate Messages'.
http://NA.BlackBerry.com/eng/deliverables/608/BlackBerry_Application_Developer_Guide_Volume_2.PDF
-
How to set the time to preview using the REST Api of the assembler
Hi all
Using the REST API of the assembler, I can't feature "set the time to preview" to trigger a specific model that fires only at a specific time
This is the format that I'm trying:
http://xxxx:8006 / assembler/json/pages/home? Endeca_Time = 2020-04 - 05 T 14:30
I use the correct format? This is the url parameter listed in the documentation of the Assembly
Thank you
It turns out that the documentation is wrong
- In assembler.properties (service\WEB-INF) of your REST API, you must define
- User.State.Ref = previewUserState
- You use Endeca_date and not Endeca_Time in the URL (documentation is wrong)
- Coding varies from a browser (you may need to URL encode the date in Firefox)
Example:
http://xxxx:8006 / assembler/json/pages/home? Endeca_date = 2020-01 - 11 T 18:00
The date format is: YYYY-MM-dd' you HH: mm
- In assembler.properties (service\WEB-INF) of your REST API, you must define
-
How to exclude table as % of AUDIT using the Datapump API
Hello
I try to use the datapump API to import the table into a database link, excluding the table with a name like % AUDIT. I have it working all except running the table. I use Oracle 11.1.0.6.It works in my application
in DB R11.2
in job_mode = "TABLE".() dbms_datapump.metadata_filter
handle-online job_handle,
name-online "NAME_EXPR."
value => "NOT IN ("TABLENAME_1","TABLENAME_2","TABLE_NAME_3")"
);Try this works for you
() dbms_datapump.metadata_filter
handle-online job_handle,
name-online "NAME_EXPR."
value-online "LOVE NOT"AUDIT %""
);Published by: astramare on July 7, 2011 14:57
-
How to use HX85BA sensors with NI DAQ system?
Hello
I'm trying to connect two sensors of Omega HX85BA moisture to my NI DAQ system. The sensors detect moisture, barometric pressure, and temperature, using three 0 to 10 VDC positive outputs @ 10 mA or less, with a common thread of output. I have a SCXI-1000 chassis with two modules SCXI-1100 cards, 1102 b and a single 1102. Map of 1102 uses a block to connect SCXI-1303, while the other three cards use some 1300 years. The system will mainly use thermocouples for temperature measurements, but there will be other types of sensors, such as the two HX85BAs.
The manual of the product for the HX85BAs is not very clear on how to connect the sensor to the system. Terminal blocks each have 32 channels with the positive and the negative screw terminals, it doesn't connect three positive sensor outputs to individual channels, with the municipality of output connected to each channel? It will work installation with SCXI cards I have, or I will have to purchase different cards? The system will be expanded to include at least 4 cards in a separate chassis SCXI 1000 more, is not a problem for the purchase of different components to adapt to the HX85BAs.
Thanks in advance!
Hi BBalmforth,
You can connect the sensor to the SCXI-1100 1300 TB. Connect the positive output of CH + and CH - CHSGND. Common output wire must be connected to GND.
-
How to use the queue data Structures stack?
Hi all, you can tell me how to use the queue, stack, the link in the list... Structures of data in the project of BlackBerry? Thanks for any suggestions!
BlackBerry devices are not java desktop running. you are limited to the blackberry api, basically j2me + rim extensions, based on java 1.3/1.4 (no enums, no generic, many collections not impl etc.).
Remove your JRE6 and change your code until there is no more error.
-
How to use the parameter B-BIS in a factory of connections
How to use the parameter B-BIS in a factory of connections (OS 5.0)?
I have found no no API for it.
-
How to use the detector face on the screen lock
I HAV a lenovo tab
I want my lock screen for face detection, but I can't lockHi Hirukhadka,
Thanks for posting your question in the community of Microsoft Windows.
It appears from the description of the problem, you want to know how to use the detector face on locked in your Lenovo tab.
I imagine the inconvenience that you are experiencing. I'll help you fix the problem.
To help you solve the problem, I would appreciate if you could answer the following questions:
1. What is the Lenovo tab model number?
2 are you trying to lock your computer using face sensor?
You need to contact your manufacturer regarding your screen using the face detector, blocking as this is a feature on your Lenovo tab.
For more information:
Contact Lenovo Support:
http://shop.Lenovo.com/us/landing_pages/contact/
I hope that the information above helps you.
Your response is very important for us to ensure a proper resolution.
In the future if you fall on any question relating to Windows, please do not hesitate to post your request here on Microsoft Community, we will be more than happy to help you.
Maybe you are looking for
-
I have the latest version of Download Helper 4.9.21 and it's on the list Add ons but I can't access it in the toolbar that I used to be able to. It is from Firefox until classified to the latest version. Similarly, my Real Downloader also stopped wor
-
How can I get my Apple TV, 4th generation, the Spanish into English installation screen. THX
-
slides off the station FM tuner
I have a new fuse (broke former screen) but when I play the radio for an hour or two while you move sometimes worse that others will come the static light, but if I turn off the lock & set the tuner upwards or downwards, then return to his post there
-
Duration of lock FireSIGHT/SourceFire user configuration?
Hi all I've been searching in the documentation for 5.3 and 5.4, and I don't find no information for what the account lockout duration is for when a user does not have the number of logins set to the value of maximum number of connections has failed
-
Error on Photoshop Elements serial number
HelloI bought Photoshop Elements years ago, now I have changed the computer and I re-downloaded. The problem is that the new installation program tells me that's not a valid serial number. It may be that I bought the software regularly.Anyone know th