I have no idea how to access a PHP based WebService from a BlackBerry.
Can anybody guide me in accessing one?
Your options are either use a proper API interface as suggested by snowflake (like REST, JSON/XML RPC etc.) or to scrape the HTML (very painful -- especially on mobile devices). The language in which the service is implemented shouldn't matter. If you are targeting OS6, there is a new communication API that makes consuming webservices easier (A sample can be found at http://devblog.blackberry.com/2011/01/communication-api-2/), but it's not too difficult on OS5 or below either. If you need to use JSON in OS5, your can find the org.me.json package online and use that.
If the webservice is under your control, you should add RPC support, the difficulty of which depends on the framework (if any) you're using for your project. Your question's a little scant on that information, so I can't provide any specific details.
See this Web Services in BlackBerry J2ME Application article. Here clearly described how to use Web services in Blackberry. And also you can refer Web services overview documentation.
Related
I've been trying to create an app which does pretty much the same thing smartthings app does with some additional functionalities. But I've struggled to understand their documentations and terminologies. I've tried to illustrate my intentions below:
However their illustration is as follows:
My questions are as follows:
What do they mean by Third party Cloud? Is it same as My API Server?
What is smartapps? Are they kind of programs to define capabilities of a device? If yes, how can we create it using API instead of Groovy program.
How is Locations, SmartApps and Devices related to each other?
How do we communicate to hub connected devices? In other words, How does My API Server know about the state changes in the device? Is webhooks used here?
I need for a project to build a live chat with:
group chat room
private chat (user-user);
web site interface;
mobile interface;
others information (profile etc).
I want to start obviously from the server: any PHP framework or tutorial to do this ?
Otherwise, any full-solution (but customizable) with web site + mobile compatible ?
Use XMPP Server (XMPP server uses Socket programming, so once a connection will be establish, then it uses that connection each and everytime, you no need to create connection everytime, like HTTP).
Or Use GCM (Using Push Notification you can send and receive messages as well).
Here are some Source Code - Github
Source from google
Hope it helps.
http://vidorsolutions.blogspot.pt/2011/01/writing-xmppjabber-chat-application-for.html
This would be the best place to start!
Have fun building the app!
Also if you really want to get deep into it, Xabber source code will prove of great help.
XMPP is a communication protocol for message-oriented middleware based on XML (Extensible Markup Language). In plain words it is a protocol used for instant messaging.
While APNS and GCM are services used to set up push notifications for your apps.
So, it's a bit different.
I believe building a chat app from scratch is not an easy task for you.
So, I'd recommend using a ready backend and concentrate on client-side implementation of your app.
For backend you need to choose a provider with the set of features most suitable for your project and then start app development with the API provided by your backend provider. You might find this article useful when choosing.
It seems you are looking to get going fast on your chat implementation...the xmpp implementation is one way. Firebase provides another. Having implemented messaging via xmpp as well as firebase, I can offer up this tip: stable connectivity and auto-reconnect logic in an openfire+SMACK implementation is not particularly reliable. I have had recurring troubles maintaining connection in the face of drop offs; updates in Openfire that may or may not conform to the older SMACK library versions are not helpful (no one guarantees for conformity - you are on your own). Others with more xmpp-based experience may attest to these difficulties. Firebase is not without its own challenges but I found them manageable. I also recommend you checkout at least one opensource chat library implementation via firebase (github link being one such). With firebase the connectivity issue largely goes away and a host of new options open up. I prefer if the backend is fully taken care of by the library provider so we only need to focus on UI. Hope this is helpful.
Is there anyway to do this? I've looked in the google-api-php-client library but it's not there yet. Is there any other way or am I out of luck?
The search API is only enabled for Python Java and Go, as Mario pointed out.
I would look into the modules documentation and try to separate your logic. Your search API can be the only module that isn't in PHP. There is no other solution for your problem unfortunately.
The team promised that a REST API would be made available at Google I/O 2011. I haven't been able to find any follow ups since.
https://www.youtube.com/watch?v=7B7FyU9wW8Y#t=2088
You CAN now access the Search API natively from PHP.
The library is in alpha but should make its way to release fairly soon.
It uses the Google Protocol Buffers so it's the same level of abstraction as the Python/Java/Go SDKs
https://github.com/tomwalder/php-appengine-search
Feedback appreciated!
I ran into this problem previously, so wrote a sample PHP+Python module pair to allow access to search via URL fetch to a Python module.
https://github.com/tomwalder/phpne14-text-search
I have a similar scenario as you. This might not be the best solution, but I've solved it as follows:
I've created a Python module using Google Endpoints API to expose a set of methods capable of sending and receiving JSON formatted data via HTTP GET or POST. These methods allow me create Documents and Indexes or do queries.
My PHP client, simply calls these urls and passes appropriate data.
So effectively I have a wrapper around the search API and the python stuff is hidden inside.
I want to code an Android client and a Windows.exe server application (possibly PHP., I am still trying to decide).
I have no problem with developing the server app, but have not yet done any Android coding. Mostly, though, I am unsure about how to communicate between client and server.
A client aapp will login to the server then at regular intervals send its location (GPS coords) to the server which will store the data in a MySql database,
A second Android app will display a historical trail of where the first user has been using Google maps, plus a little more functionality.
Since I am not serving HTML, I am wondering whether to use HTTP GET / POST or a proprietary protocol over TCP/IP. I would like to encrypt it, so SSL seems in order,
Is there any compelling reason to use one or the other of use HTTP GET / POST or a proprietary protocol over TCP/IP?
Would coding my Android app be easier if I used JSON as my data format (or something else?), irrespective of the protocl used to transfer the data?
Hmmm, since much of the data returned as a response to GET by one of the apps will be data used to draw a Google map with a series of points showing travel, could I do the heavy duty processing on the server & return the HTML (or JS) necessary to display it an dhave the app embedd a browser in its UI to display the map? (the UI will also disply more, but maybe I shoudl just make it browser based HTML & JS, rather thn an actual Jav Android app? As you can see, I am confused)
[Update] I want to code both the clients and the server and to host the MySql database. I would prefer no 3rd party frameworks unless they are excedding simply to use and play very well together with Delphi or PHP.
I may recommend you to use Wcf with poco entity that provide you security as you want and create client in android to consume it.here is simple example of using wcf in android-http://fszlin.dymetis.com/post/2010/05/10/Comsuming-WCF-Services-With-Android.aspx
I would strongly recommend the use of the newest Google Play Services with the Google Cloud Messaging... It takes out of you all that work.
Check out, see if you like ;D
Google Cloud Message: http://developer.android.com/google/gcm/index.html
There is also a great video of this year's Google I/O about the maps improvement on Google Play Services:
https://developers.google.com/events/io/sessions/325172829
Are you trying to create App that can be delivered from Google Play Store or a Andriod enable Web application? You Question is confusing in your need. If you are looking to create Andriod Apps then definitely PHP is not going to serve it up. Look for Andriod SDK and create your interface using that, then for Windows Server EXE you can do PHP based API or as suggested by other answers. But for User interface PHP is no. You need to read and understand the different between APP and Web App. or your question is not very clear on topic.
We're planning a new project which will feature an API available to customers to interact with our app from their own web sites and systems. However never having built anything close to an full-fledged API in the past, I am not aware of any standards or recommendations that are available and could be used to make the API more easily adapted by our customers.
We will build the API using PHP and some parts of the API will need authentication while others don't. As of today, I have read a little about Oauth, SOAP & REST, but I have no idea on what is good practiec.
What technology/standard is recommended to base an API for 2011+ upon?
There are a number of options, but I would suggest that you may find publishing a SOAP API from PHP quite tricky to maintain.
The reason for this is that there is no inherent WSDL generation within PHP, so you'll either have to roll your own (and modify it each time), or experiment with one of the 3rd party tools - none of which I have found particularly satisfactory in the past.
I would suggest that a more straightfoward method for implementing an API in PHP would be to go down the RESTful route.
I would check out the choices made by successful APIs that are available through sites like Mashery or Programmable Web. By focusing on the successful API patterns before choosing a technology you will have a better chance that the API will work and be successful.