Twitter APIs for blackberry implementation - blackberry

I am trying to implement the blackberry application which will help the user to update his status through application.
Its like user will enter the username, password and status it will update his status on twitter.
I have seen Twitter API docs but didnt understood how to start. It has many things like application registration and OAuth process which i felt very ambiguity.
I have also tried to use some external jar for blackberry but some of its classes/packages is not supported
twitter4j-core-2.1.1-SNAPSHOT.jar ----> Error preverifying class twitter4j.TwitterBase
java/lang/NoClassDefFoundError: java/io/Serializable
jtwitter.jar ---> VERIFIER ERROR org/json/Test.main([Ljava/lang/String;)V:
Cannot find class java/io/StringWriter
signpost-core-1.2.1.1.jar ---> Error preverifying class oauth.signpost.http.HttpParameters
java/lang/NoClassDefFoundError: java/util/Map
Please friends help me with how to start. it will be appreciated if any link or jar which support on blackberry can shared.

For a 10,000 mile view, you first need to preverify your jar files using the preverify.exe tool in the bin directory of your simulator.
You then need to create a new project, change the project type from CDLC -> Library and add your twitter4j-*.jar to it. Set this project as a reference (right click your main project and it's somewhere in the properties) to your main project. Next, configure build path for the main project and add twitter4j-* to your build path.
A detailed view with screenshots for eclipse is provided for a different library at -
http://www.craigagreen.com/index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html
More info -
http://supportforums.blackberry.com/t5/Java-Development/Tutorial-How-To-Use-3rd-Party-Libraries-in-your-Applications/m-p/177543
If it's a simple tweet, you might be better of just doing a HTTP POST with the appropriate parameters.
Check URLEncodedPostData and HTTPConnection for more info about HTTP Post requests.

Related

how to implement implement deferred deep linking in electron

Trying to find information on how to implement deferred deep linking in electron app but can't find it in the official electron documentation.
We have an electronic application. I need the following behavior: when a user tries to open a link of this type -> custom-protocol: // some-data in the browser, if the application is not installed, then automatically download the application and, after installation, pass the parameters contained in the link (some-data) to the application. Can anyone suggest how to implement this in electronic or a link to the documentation or show some abstract example of implementation
On Windows, custom protocols are stored in the registry. This is a chicken and egg problem because your application already has to be installed on the system for the registry entry to exist.
If you rewrite your application as a UWP app (lol) you might be able to check with getInstalledRelatedApps to see if the app is already installed.
If you want to streamline how your application is installed from the web, consider using ClickOnce.
So basically you just want a way to pass some query params to your application when installed from your website.
You can do this if you package your electron application as an MSIX. Check out the article below from Microsoft, that documents the process:
Passing query params to an MSIX packaged app

How to run di basic example of WSO2 EI Business Process?

I am absolutly new in WSO2 EI and I have the following doubt.
I am following this official tutorial to study the creation of a business process BPMN process):
https://docs.wso2.com/display/EI600/Quick+Start+Guide
If you go in this tutorial the second tab is refered to the Business Process Management tutorial, then I continue following the business process BPMN process street.
I followed all the tutorial and I think that I have understand the key concept of this example but I have some doubts about how to run this example.
At the end of the tutorial it does:
To create the Business Archive File (.bar), do the following.
On the Explorer, found in the upper left of your screen, navigate to Package Explorer.
Right click on the package and select “Create deployment artifacts”.
Navigate to the location of the source. You will find the .bar file inside the deployment folder.
So now I have my /HelloWorld/deployment/OrderApproval.bar file created.
But now what have I to do with this file?
I also have download the EI Server from here: /HelloWorld/deployment/OrderApproval.bar
Then I have configured it in my Eclipse Developer Studio EI setting it as a WSO2 server.
So my doubts are:
What exactly represent this OrderApproval.bar file? Is it a file representing a WSO2 EI executable project or what?
From what I have understand the previous example represents a work flow representing a BPMN process that implements a flow with some rules without that I need to write Java code (correct me if I am doing wrong assertion). But is it something executable or something that have to be integrated into some other application?
If it is an executable project what have I to do to run it and interact with it?
BPMN is process definition that can be run on BPS server. BPS server is part of WSO2 EI solution. You have to run it from [EI_HOME]/wso2/business-process/bin
On Linux/Mac OS: sh wso2server.sh
On Windows: wso2server.bat --run
Then, when it works correctly, open https : // [serverIP]:[port]/carbon/ and log into the EI-Business Process management console.
Next navigate to Home -> Manage -> Processes ->Add -> BPMN and upload your OrderApproval.bar file.
After uploading file, log into the BPMN-explorer at https : // [serverIP]:[port]/bpmn-explorer. On the "proecesses" tab you should see your process which can be run by action->start.
Try studie this example: https://docs.wso2.com/display/EI600/Creating+a+BPMN+Process

Pentaho 5.0.1 CE Adding folder to pentaho-solutions directory

How do I get a folder to appear in the browser after adding it to \pentaho-solutions in Pentaho 5.0.1 CE. The documentation I read does not seem to work with this new version.
1. Create a new directory in /pentaho/server/biserver-ee/pentaho-solutions/.
Use underscores instead of spaces in the solution directory name. Ensure that the directory has the appropriate user
and group ownership to be writable from the BI Platform.
2. Using an XML-aware text editor (or Design Studio), create a file named index.xmlin your new solution directory.
3. Copy the following text into the index.xml file, changing the content accordingly:
***<index>
<name>Example Solution</name>
<description>This solution contains examples I created while learning to
work with action sequences.</description>
<icon></icon>
<visible>true</visible>
<display-type>icons</display-type>
</index>***
4. Save the file and close the text editor.
5. Log into the Pentaho User Console as an administrator.
6. Refresh the solution repository cache by going to the Toolsmenu, then selecting the Refreshsubmenu, then
clicking on Repository Cache.
You now have a new solution directory. It will show up in all file dialogues in the Pentaho User Console as well as the
Solution Browser in the left pane.
Every time you add or edit an action sequence to your solution directory, you must refresh the repository cache as
explained above. Each user currently logged into the Pentaho User Console must also refresh their session cache; this
is best done by re-logging into the Pentaho User Console.
I am using Pentaho design studio to develop an xaction sequence script. I followed this procedure:
1. In Design Studio, go to the Filemenu, then select New, and click on Other...in the sub-menu.
The Newwindow will appear.
2. In the Newwindow, click the triangle next to Pentaho, select New Action Sequence Wizard, then click Next.
3. In the File namefield, type hello_world.xaction.
4. Select Hello Worldfrom the Templatedrop-down box, then click Finish.
The wizard will generate the new file and bring you back to the workbench.
5. Click on HelloWorldComponentin the Process Actionssection on the left.
The right side of the screen will change to show the options available for this action: Nameand Message. The
Name field controls the name of the component in the Process Actions list on the left; it doesn't do anything else of
note. The Message field contains the text that will appear on the screen when the action sequence is run. It is prepopulated with %quote, which is a token that represents a quote message in a nonexistent properties file. Pentaho
used to provide properties files for each example, but they have been removed from the standard Pentaho Business
Analytics distribution.
6. Replace the %quotewith a sufficiently inspiring message.
Alternatively, you could create a hello_world.propertiesfile and populate it with the appropriate messages and
tokens, but that has no advantage unless you intend to internationalize this action sequence.
7. Save the file.
You now have a working action sequence that prints a short text message: "Hello, World." plus whatever you typed into
the Message field. The first part of the message is determined by a message bundle packaged with the Pentaho Web
application archive.
To test the action sequence, use the Test tab if you are on Windows or OS X, or log into the Pentaho User Console and
run it from the Solution Browser.
Running the sample xaction fails with
Sorry. We really did try.
Something went wrong. Please try again
or contact your administrator.
I figure this is because pentaho cannot locate the xaction file as specified in the file path when I generate the url from within design studio. The folder I created within the solution directory does not appear in the browser directory list despite refreshing the cache. Any help?
With Version 5 the files and folders are no longer stored in "/pentaho/server/biserver-ee/pentaho-solutions/..."
It is stored now in a jackrabbit repository.
You can create folders and upload files in the user console.
I did mistake after starting biserver 5.2. Unexpectedly i deleted Public folder after configuring to jackrabbit. Now how do i create the folder so that i can see Public and Home Folders.
Sorry for getting back to this question some time later, just in case someone searches something related to Pentaho repositories management with no success, i hope this information can help.
Just to make things more clear, i'm using version 5.2.x and i'm supposing you want to create a new folder on the root directory of Browse Files screen, something that is not allowed on Pentaho5 CE Web Console.
The answers about repository management based on JackRabbit are correct, so the old way we used to configure new "solutions" folders doesn't work anymore. From version 5 on, Pentaho exposes an interesting REST api that allows you doing things not allowed in web console.
For instance, for creating a folder in root directory you should create a http REST PUT request against Pentaho Server (using tools like curl or if you appreciate Google Chrome, something like Advanced Rest Client, etc.) using the following URL:
http://localhost:8080/pentaho/api/repo/dirs/:new_directory_name?userid=admin&password=password
Pentaho repository directory REST api is documented here:
http://javadoc.pentaho.com/bi-platform500/webservice500/resource_DirectoryResource.html
It's worthy to spend some time reading REST API the documentation.

Building Passbook Passes

I've been working on integration of Passbook for some of my apps. Right now, I've used Ray Wenderlich's tutorial on this, and it is quite frankly a pain to build even one Pass. I have to get the icon files all in place, program the JSON file, get the manifest file filled in with all the SHA1 values, and run a few lines in terminal to sign it, and then another line to zip it. Are there any online services or programs that can be used to save a pkpass file to computer, that I can then upload to my server?
There are also quite some developer tools that help you to create passes, you can find a list on wikipedia.
We provide an Objective-C SDK and a free cloud service that lets you create templates and generate passes. You can find the SDK on github (Sample App is included).
There are a number of services that can be used to generate passess. Take a look on wikipedia for a comprehensive list of providers, tools and projects.
If you want to update passes, then you will need to build a Passbook Web Service. When a pass is updated, the web service sends a new .pkpass bundle to the device. Therefore, your web service must also be capable of signing passes unless you want to manually create and upload them to your server before sending out a push request.
Using our service, PassKit, you can create a template using WSIYWIG editor then create a pass directly on your server via a simple API call. You can also update passes and push updates to passes via our API. If you just want to get hold of the .pkpass bundle, then you can append /d to the pass URL (the one beginning with r.pass.is), or use PassKit API in your User Agent string.
you should also check out Apple's Passbook Support Materials here:
https://developer.apple.com/passbook/
They have a simple XCode project called SignPass that you can use to easily create your own Passes.
Note: you need to be a member of Apple's Developer program to access these materials ..
There's lots more Passbook related info here:
http://www.flonsolutions.com
Andrew

Oauth and Jtwitter

I am trying to use Oauth with jTwitter.. and get an exception while creating the Oauth signpostclient
String JTWITTER_OAUTH_KEY="GDdmIQH6jhtmLUypg82g";
String JTWITTER_OAUTH_SECRET="9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8";
OAuthSignpostClient client = new OAuthSignpostClient(JTWITTER_OAUTH_KEY, JTWITTER_OAUTH_SECRET,"oob");
throws the following exception
Exception in thread "main" java.lang.NoSuchMethodError: oauth.signpost.AbstractOAuthConsumer.(Ljava/lang/String;Ljava/lang/String;)V
at winterwell.jtwitter.OAuthSignpostClient$2.(OAuthSignpostClient.java:182)
at winterwell.jtwitter.OAuthSignpostClient.init(OAuthSignpostClient.java:182)
at winterwell.jtwitter.OAuthSignpostClient.(OAuthSignpostClient.java:144)
at jay.twitter.HelloTwitter.main(HelloTwitter.java:16)
What am I doing wrong? Can anyone help pls.
You need to download the signpost oauth jar and add it to your classpath/project.
JTwitter works with a few different oauth libraries, but the download doesn't include any of them.
By the way, itls a good idea to get your own key & secret by registering at dev.twitter.com.
download signpost.jar
add it to your class path/project
Hope will get solution
You probably has no OAuth library.
There is a number of libraries available, but I recommend using signpost.
If you are using eclipse, you should do this by:
right clicking on the project -> Build Path -> Configure Build Path
And then click "Add Jar" if the signpost jar is in within your files or "Add External Jar" if it is somewher else.
Finally, you should have an twitter app in order to twitter talk to yout app and have the strings for . In order to do this, you should sign up your twitter account as developer in developer.twitter.com and then create your app on twitter. And then you will have your own values for JTWITTER_OAUTH_KEY and JTWITTER_OAUTH_SECRET (if you don't have yet).

Resources