So, I've been through the BlackBerry API, and the online documentation, but I'm having an issue with connecting and getting it to display. I've uploaded the image to the Apache server, and I can access it through localhost, but I can't get it to display to the screen.
I am developing in Eclipse workspace, in a windows vm.
you have to create http connection to interact with server
the server will send u data in bytes
convert this to encoded image / bitmap image and display on screen
try these:
RIM's HttpConnection documentation.
StackOverflow questions:
BlackBerry app unable to establish Http Connection with server
post and get data via webservice
For converting a byte array to a bitmap: Display static Google Map image in BlackBerry 5.0
Related
I was looking for image sharing using XMPP framework. The little research I have done, describes that first I need to upload that image to the server and the corresponding link for that image will be received which can be later used to sent the image in the form of link to the XMPP server. Any other way out other than this in which I can directly sent the image to the XMPP server will be helpful.
You can use XEP-0096 (XMPPSIFileTransfer) and XEP-0065(TURNSocket) together to achieve the file transfer.
I have an mp4 (h.264) file that I want to play on an IPhone (via HTTP). When the file sits on a Windows IIS server, my IPhone and IPad will play the video without any issues.
The file is here: test file
I will leave access to this server for a few days for testing purposes.
When the file sits on our proprietary server, my IPhone and IPad request the download, but then stops the process almost immediately. Non IOS phones and desktop browsers have no problems requesting and viewing the video from the proprietary server. I don't believe that it has anything to do with the HTTP response headers because of the fact that non-IOS phones can play the video.
I use Wireshark to see the http/tcp requests between the IPhone and the server. I see the IPhone request the mp4 and then I see the server send a "200 OK" response and then start to send the file. Soon after the server starts to send the file, the IPhone sends a "reset" request which stops the sending of the file.
Any ideas why the IPhone would reset the communication and stop the file from being sent? I am far from a regular user of Wireshark, so hopefully, my reading of the file is correct.
Here is an image of my Wireshark capture if anyone is interested. It clearly shows the reset from the IPhone.
Wireshark Image
Any help will be appreciated.
Thanks,
Dana
This has been solved. Our server did not handle HTTP requests for partial content (i.e. Range: bytes=0-999). Range headers in incoming requests were being ignored.
We updated the server to handle these requests and IOS devices are now able to download video from our server.
See the link below for more info:
http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p5-range-latest.html
I am writing an iOS app for a service that runs on Azure. I need to be able to upload images (users' profile pictures) and get back the image's URL.
Azure's SDK for iOS doesn't seem to work with Blob, but only with Tables.
On my search, I've found tutorials like this, which gives an intro on the SDK, or this one that shows how to store a base64 string of the image in a table, but that's not what I'm seeking.
Is it possible to upload images to the Blob? If yes, how?
I am not an ios person, but have worked on apps that run on azure and communicate with ios for information hence this might be of your help as I am certain rest services can be accessed from ios.
http://msdn.microsoft.com/en-us/library/azure/dd135733.aspx
I am creating an application which streams a live feed of the blackberry screen from a blackberry device to a web browser. This should allow a user to view the screen of the blackberry from the browser. Could someone suggest a stepwise method to do this?
Check this method, public static void screenshot(Bitmap bitmap).
Documentation says that it takes a screenshot of the entire screen and saves it into a Bitmap, if supported by IT policy and/or application control. If the method works then it is possible to broadcast the screencast of a device by:
Continuously taking screenshot (maintaining feasible interval) and
Sending them to some server/destination (image compression can be applied before sending).
Multipart Post/ Image Upload Issue - The following links may be
helpful.
BlackBerry Multipart POST Demo - Github
HTTP POST Multipart file upload in JavaME - Nokia Developer
Upload Image in BlackBerry - StackOverflow
Posting Data via Http from Blackberry
i have been working on developing an blackberry application. as per now i want the application to connect to a local server on my network and fetch a file from that machine. i have been using the library given by a named blackberry developer Mr.peter strange....here is the link for the same Http connection through BIS-B
my requirement would be setting up connection to the local server using any transport mode but it should be able to render the text downloaded.
i tried using the demos provided by blackberry samples as it comes with the plugin for eclipse the http demo from those samples shows only trying to setup an http connection string and the networkapidemo sample shows diffrent http codes when the url is entered as desired.i am running all the applications on the simulator. i havent tried running any of my apps on the hardware
may i know why this problem arises of http codes....ill also want to know guidelines about how to set a simple http connection just to download a file(text file) from a local server.
I have tried many forums too. if anybody would have a look at it i would post it here.
Only a simple connection is becoming a headache!
anyways...waiting for replies..
thanx in advance guys :)
It does not matter whether you want to communicate with local or remote server.
1) See the API docs on HttpConnection. There are sample code in there.
2) Unfortunatelly, on BB you should be aware of Network Transports. Check this thread to get all info you need on Network Transports.
UPDATE:
The second point explains an approach that will work on any OS. If you need an OS 5+ only approach, then check the ConnectionFactory API. ConnectionFactory usage sapmles.