Using Google Spreadsheet API on Blackberry
I am trying to build a Google spreadsheet synchronization feature on a blackberry application that I am building. Not being a pro I was hunting for some sample code to get a grasp of the flow but I could not.
When I am using the API from Google to access spreadsheets, it suggests to use the SpreadsheetService class.
try
{
SpreadsheetService service = new SpreadsheetService ("MRythm");
开发者_StackOverflow service.setUserCredentials("username", "password");
service.getFeed(new URL(""), arg1)
}
catch(Exception e)
{
}
Now the problem is J2ME or Blackberry does not feature the URL class from java.net library.
I am just looking for a sample approach to connect to a Google spreadsheet from Blackberry.
Thanks in advance
The Java code for the GData API was written for J2SE. Consequently, it won't work for BlackBerry or J2ME. Fortunately, the API is based on HTTP and XML, which can be accessed on Blackberry or J2ME. Unfortunately that means you have to start from scratch and write all the XML parsing code yourself.
Try using HttpConnection
精彩评论