How to simulate BlackBerry options/commands from java code?
Hi friends,
For wipe/erase of personal data, we have the following option on BlackBerry phone (model: 9930)
Options of-> Security-> Security Wipe
I want to give the same option in my BlackBerry App (e.g.. A button marked "clear data")
How can I simulate the same functionality through java code
Can someone please provide some help or provide a reference to the entire API
Thank you
Laughing out loud
You can enter simulation (clicks, presses), and you can launch native applications, if you know their module name, but both approaches have their limitations.
See http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html... or http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html... to see how to apply.
Tags: BlackBerry Developers
Similar Questions
-
Try to call from java code process.
What do we call a task of IOM process from java code?Thor.API.Operations.tcProvisioningOperationsIntf has long addProcessTaskInstance (long plTaskKey, long plOrcKey) API.
Please visit http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e17334/Thor/API/Operations/tcProvisioningOperationsIntf.html for more information
-
How to get to variable in backing_bean from java code
I need to reach one of my variable in a backing_bean of java code (when click the button I need to get the value of the variable is on one of the backing_bean)
I have defined the field of beans as session
what I need to do
Copy the following code in my bean
private String loginType.
public String cb2_action() {/ / I call this method}
setLoginType ("skip");
}
and in this method, I try to get the value of the parameter
public String getLoginType() {}
FacesContext fctx = FacesContext.getCurrentInstance ();
ELContext elctx = fctx.getELContext ();
Application = fctx.getApplication ();
ExpressionFactory exprFactory = application.getExpressionFactory ();
ValueExpression valueExpr =
exprFactory.createValueExpression (elctx, "#{bindings.loginType.inputValue}", Object.class);
oracle.jbo.domain.Number departmentId = null;
loginType = (oracle.jbo.domain.Number) valueExpr.getValue (elctx);
"" return loginType + ' ";
}
When I run the code it returns nullso, in this case... Set the connection type in a sessionscope... and access it anywhere...
Map
sessionMap = (Map )ADFUtils.evaluateEL("#{sessionScope}"); sessionMap.put("loginType",loginTypeValue); // loginType value is set here.. //access it outside like Map sessionMap = (Map )ADFUtils.evaluateEL("#{sessionScope}"); sessionMap.get("loginType"); -
How do the archiving of content through java code
I need consignment content through java code.
Summary of the problem: If someone send an email to a specific account this attachment automatically checkin to content server and the required metadata is read from the subject and message body.
Now I have the problem that I'm not able to record of attachment to the content server. I have all the required metadata and the attachment that is extracted from an e-mail.
Please someone help me, how I'm going to call the consignment through java code.
Hello Deepak,
Try the code below and let me know how it goes, I wrote all code example for you
Note: When you find '<>> ', you need to write real values.
import java.io.BufferedReader;
import java.io.DataInputStream;
Import oracle.stellent.ridc.IdcClientManager;
import java.io.File;
import java.io.FileInputStream;
to import java.io.FileNotFoundException;
to import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Import oracle.stellent.ridc.IdcClient;
Import oracle.stellent.ridc.IdcClientException;
Import oracle.stellent.ridc.IdcClientManager;
Import oracle.stellent.ridc.IdcContext;
Import oracle.stellent.ridc.model.DataBinder;
Import oracle.stellent.ridc.model.DataObject;
Import oracle.stellent.ridc.model.DataResultSet;
Import oracle.stellent.ridc.model.TransferFile;
Import oracle.stellent.ridc.model.impl.DataObjectEncodingUtils;
Import oracle.stellent.ridc.protocol.ServiceResponse;
public class servicesTest {}
The University Complutense of MADRID soldev3 connection string
Private final public static String idcConnectionURL = "idc://UCM path";
private public final static String username = "weblogic";
public IdcClient getUCMConnection()
throws IdcClientException, IOException {}
ClientManager IdcClientManager = new IdcClientManager ();
Customer IdcClient = clientManager.createClient (idcConnectionURL);
UserContext IdcContext = new IdcContext ("username");
customer feedback;
}
' public void checkinFile (String Filename, String Filepath) survey IdcClientException, IOException {}
System.out.println ("in the createUser method..");
IdcClient client = getUCMConnection();
DataBinder binding = client.createBinder ();
System.out.println ("in the checkinFile method...");
binder.putLocal ("IdcService", "CHECKIN_UNIVERSAL");
binder.putLocal ("dDocTitle", ""
> ""); binder.putLocal ("dDocName", ""
> ""); binder.putLocal ("dDocType", ""
> ""); binder.putLocal ('dDocAuthor', 'sysadmin');
binder.putLocal ('dSecurityGroup', 'Public');
binder.putLocal ('xlanguage', ""
> ""); binder.putLocal ("dOriginalName", Filename);
binder.addFile ("primaryFile", new TransferFile (new File (Filepath + Filename)));
UserContext IdcContext = new IdcContext ("username");
client.sendRequest (binder, userContext);
System.out.println ("After checkinFile method...");
}
Public Shared Sub main (String [] args) throws IdcClientException,
FileNotFoundException,
IOException, Exception {}
MAK servicesTest = new servicesTest();
mak.checkinFile ("
>"," >" "); }
}
Thank you
MAK
-
Read current user connected from java code VOImpl
Hi experts,
I use Jdev 12.1.3 and I would like to read the value of adf.context.securityContext.getUserName () in the java code of a VOImpl so I can pass it as a parameter to a PLSQL stored procedure.
How can I do?
Thank you very much
Jose.You can use the code below:
String currentUser store = ADFContext.getCurrent () .getSecurityContext () .getUserPrincipal () .getName ();
Thank you
-
How to insert a new accessory through java code
Hello world
I need to add a new accessory through java code. I found the service EDIT_RENDITIONS in the add attachments page. But this service is not documented. Does anyone have an example how to add attachments?
Thank you
Martin
Martin,
Try the following code:
final IdcClientManager clientManager = new IdcClientManager();
Customer IdcClient;
try {}
client = clientManager.createClient (IDC_PROTOCOL + RIDC_SERVER + ":" + RIDC_PORT);
final String username = 'sysadmin ';
final DataBinder dataBinderReq = client.createBinder ();
ServiceResponse severiceResponse = null;
dataBinderReq.putLocal ("IdcService", "EDIT_RENDITIONS");
dataBinderReq.putLocal ("a", '1560'); as integer
dataBinderReq.putLocal ("dDocName", "DEV2_001509"); AsString
dataBinderReq.putLocal ("renditionKeys", "addRendition0"); AsString
dataBinderReq.putLocal ("addRendition0.name", "theFileName");
dataBinderReq.putLocal ("addRendition0.description", "theFileDescription");
dataBinderReq.putLocal ("addRendition0.action", "modify");
final String fileName = "c:\\test.txt";
final file = new File (fileName);
final TransferFile tf = new TransferFile (queue);
dataBinderReq.addFile ("addRendition0.file", tf); as bytes
severiceResponse = client.sendRequest (new IdcContext ("username"), dataBinderReq);
final DataBinder dataBinderResp = severiceResponse.getResponseAsBinder ();
DataBinder resultado = severiceResponse.getResponseAsBinder ();
System.out.println (dataBinderResp.ToString ());
} catch (final IdcClientException e) {}
System.out.println (e.getMessage ());
e.printStackTrace (System.out);
}
Jonathan
-
Hi all
I have a requirement in which I need to create a selection based on the parameter query that user input. If the query will include the parameter if its value is not null.
Is it possible to add this query in the resource file?
In case I want to execute java code, how can I call to run the query of theis?
I tried result Long = ws.executeSQL (query.toString ());
but it gives an error because executeSQL is for DML queries.
Please suggest an approach.
If you do not know the name of the column, you must use createResultSetSQL.
Jonathan
-
How to call trial task of custom Java code directly
I'm a java code write Victorian where I want to call the process task directly "Delete user" resource AD. Then, I'll put this java class as part of a scheduled task.
No API to IOM for this?
Pls suggest.
-Thank youThis is why I told you that to see the API with care:
You will have to pass256 in the first place and alternation task Instance key, to the second place.
You're done!
-
How to get the return value from Java runtime.getRuntime.exec?
I am running shell from a (GR 11, 2) Oracle database commands on aix.
But, I would get a return value of a shell comand... as you get with "echo $?"
I use a code like
but I do not get a return value... because I don't know how to get the return value...CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS import java.io.*; public class Host { public static int executeCommand(String command) { int retval=0; try { String[] finalCommand; finalCommand = new String[3]; finalCommand[0] = "/bin/sh"; finalCommand[1] = "-c"; finalCommand[2] = command; final Process pr = Runtime.getRuntime().exec(finalCommand); pr.waitFor(); } catch (Exception ex) { System.out.println(ex.getLocalizedMessage()); retval=-1; } return retval; }; /
Published by: user9158455 on 22-Sep-2010 07:33Hello
Your pr.exitValue () has tried?
I think you also need a finally block that destroys the sub-process
Concerning
Peter -
How to stop blackBerry smartphones 'sent from my blackberry verizon wireless' projection on e-mails
Did someone with Verizon knows how to stop the annoying slogan "Sent from my Verizon Wireless Blackberry" at the bottom of emails when sent from the Blackberry?
s ' please connect to your BIS account live www.blackberry.com/go/vzw and edit trhe account on the site of the BIS Setup.
-
How to add convertNumber in inputText in java code
jdev 12 c
I need to dynamically add inputText with convertNumber in backing bean.
RichInputText riText = new RichInputText(); riText.setLabel (label); riText.setId ('it' + ind); riText.setVisible (true); riText.setRendered (true); riText.setSimple (true); How to add convertNumber to riText? Thank you.
I thought about it how do in java. I need to use NumberConverter.
RichInputText riText = new RichInputText();
riText.setLabel (label);
riText.setId ("it" + itind + "_" + ind);
riText.setVisible (true);
riText.setRendered (true);
riText.setSimple (true);
Application = FacesContext.getCurrentInstance () .getApplication ();
NumberConverter nc =
Application.createConverter ("oracle.adf.rich.Number") (NumberConverter);
nc.setType ("number");
nc.setMaxFractionDigits (2);
nc.setMaxIntegerDigits (11);
riText.setConverter (nc); -
How to get the value on a model that is defined in the java code in email
Hello
I created a custom code and send email as well to custom component. I can send emails using the method:
InternetFunctions.sendMailTo (EmailID, EmailTemplate, subject, cxt);
But my problem is that I have to get a value in the model of "EmailTemplate" which are defined from java code. but I don't know how to get the value.
I will highlight in the java code by using this code: binder.putLocal ("ErrorApproveRejectMsg", massegeBody);
I'm trying to enhance the model using the code below, but not able to get.
1 < $exec getValue ("#active", "ErrorApproveRejectMsg") $ >
2 < $exec getValue ("#active", ErrorApproveRejectMsg) $ >
3 < getValue ("ErrorApproveRejectMsg") $exec $ >
4 < $exec getValue (ErrorApproveRejectMsg) $ >
5 < getValue ("#local", ErrorApproveRejectMsg) $exec $ >
6 < getValue ("#local", "ErrorApproveRejectMsg") $exec $ >
7 < $ErrorApproveRejectMsg$ >
8 < $exec ErrorApproveRejectMsg$ >
Assuming that cxt will be your Service or execution context object
You can do something like this
DB. PutLocal ("ErrorApproveRejectMsg", "Error");
cxt.setCachedObject ("DataBinder", db);
PageMerger h = new PageMerger (db, cxt);
cxt.setCachedObject ("PageMerger", h);
InternetFunctions.sendMailTo (usersEmail, emailTemplate, emailSubject, cxt);
where db is current databinder object, and you can put any variable custom in the workbook by using the putLocal method.
Thank you
Vikram
-
How to trigger an ActionListener JAVA code?
Hello
I have the button and the button has an ActionListener attached.
I want to trigger the ActionListener from java code (no click in the interface).
How can I do this?
Thank you.
I found the answer.
save.doClick ();
-
How to create a BPEL Process task using java code
Hello
I created a BPEL process (for creating task), in which my requirement is that I need to create a task based on some inputs and assign it to the user in partucular and then get out of this flow.
earlier, I felt that I will use the human task activity. but when I use that task will be created in the same process and proceedings will be stuck on there until human intervention (the BPEL process waits for the result.).
is it possible that I can use Java activity and create tasks from java code, 'I know how to assign a specific user task. Please tell me.
Abhishek
Published by: abhishek on April 25, 2011 12:42 AMHi Abhishek
1. you can try this alternative approach and it should work.2. basically, most of the BPEL process eventually auto generated Web services (.) WSDL). When we create a BPEL process, everything we do is give diagram of input, output schema and creates a bpel process with the default operation named as "process" in all the old versions as up to 11.2 SOA (and maybe before). BUT SOA 11.3 from, we can create a process BPEL, with our own WSDL and our own scheme. There is no restrictions like having only a single operation named 'process', etc.. In any case, what I mean is, each BPEL process ends up as a WebService, with entry and exit of the payloads of XSD.
3. from the JDeveloper itself, locate the .wsdl for your BPEL process under the Workflow project. Create a new project of Proxy customer service Web and generate a customer for this wsdl Web service proxy. This will create you Service, Port and JAVA classes equivalent payload theoretically in your case taskpayload.xsd with these 4 items you have. Ignore the full blown the HumanTask which has all the system elements and attributes of a task of bpel. All you need is to undertake a task with your own payload data. Create a simple Client Java (EJB or Servlet later to make more flexible). In this Java client, retrieve the Service object in the proxy and port. Then instantiate the java class that represents the payload. Set 4 values you want and set the user name, etc. You may need some adjustments for the setting of the user. Then the port invoke otherwise (go your java object here).
Sample code snippet
prepare the message for BPEL of appeal; Define the fields that can not be null
MyPayloadRequest myPayloadRequest = new MyPayloadRequest();
myPayloadRequest.setInitiator("");
myPayloadRequest.setTitle("");
myPayloadRequest.setEmployeeName("");
myPayloadRequest.setEmpContact("");web service client Get for BPEL receive point and call: first generate client proxy
MyBPELPProcess_client_ep serviceClient = new MyBPELPProcess_client_ep();
MyBPELPProces proxy = serviceClient.getNewMyBPELPProces_port ();
proxy. Process (myPayloadRequest);Please note that you can also use the SOA workflow API and the Manager back call personalized for this first task classes. In this class, you can have the methods of the interceptor, which is called each time a task is initiated, saved, Submit, approve etc etc (all events essentially). This gives you access to all the objects in a workflow with full charge blown. So you can always get the data you pass above and in this custom class, the value of the user, date/time etc..
It's just a different approach you can try.
Thank you
Ravi Jegga -
Read configuration data source AM from Java Bean code
Hi experts,
I use Jdev 12.1.3 and I need to read the name of AM Datasource from Java Code, to get a text like "jdbc/nomsourcededonnees.
Is this possible?Thank you very much
Jose.This object has methods getURL(), getUser() and others.
But there is no method as getDataSourceName()
(AFAIK, jdbc connection "knows" nothing about the Data Source)
You can try something like this inside your AppModuleImpl class:
this.getSession () .getEnvironment () .get (Configuration.JDBC_DS_NAME)
Dario
Maybe you are looking for
-
where can I find the site 'werk.nl '.
I'm looking for the site 'werk.nl'. normally I can fill, but the site is completely different.
-
Greek subtitles from any source for my Toshiba 32L 4333
I thing I tried everything. Another encoding (utf8, ansi, unicode), different formats, different sources (usb, dlna) subtitles but it seems I can't do (Greek) subtitles are displayed. I can't understand what I'm doing wrong. Any suggestions?
-
Reading of several strain gauges (10 to 20 strain gauges)
I work on my ME senior project and I try to read the pressure on the suspension triangles and the stems of thrust for vehicle FSAE of our school. I want to read and data log 5 readings of strain by corner so 20 strain readings altogether. The system
-
Pavilion dv6-1350us Entertainm: Pavilion dv6-1350 us running Windows 7 will not be closed
Have not used my laptop for the last 45 days and have not installed anything new. W7, 64-bit running. Just used on these days and it will not be closed. When I stopped it just hangs and displays that says: "if it please do not turn off or unplug your
-
This just started to happen, and I don't remember to make changes.