beta
Hello developer. Login with your existing account. New to Vodafone Developer? Register your account.

+ Login or create an account

0

Hi all!

I'm new to widget development, so I have some questions that I would like to have answered, if possible...

1. In the examples provided, Flickr and Twitter, the respective APIs are used. Those APIs came from where? I mean, where they developed just for the use of widgets, or they already existed? If so, which more APIs exist that we can use and how can we find them?

2. Is it possible for a widget to use some kind of database? As I understood of what I've read, it's possible through a request to a remote server that holds the db right? Can someone give me a simple description on how to do something like this?

3. What can I do with the webKit library? Is there any documentation on it?

4. Is it possible to interact with mobile phone data, like send a text message or get information on contacts?

Thanks on advance for any reply and sorry for my english. ;)

7 Answers:

0
Hi pjam, Nope, that can't be used. If you want to have something like that you have to write a custom alert function yourself that "pops up" a div with a message and confirm/cancel buttons. Best regards, Ernst
0
Hi again. I have another question... Is it possible to use the js alert and confirm function on mobile devices? In Opera they don't do nothing... Thanks
0
First of all, thank you for the replies. I'll give it a try to the sms functionality. As for the question 2, I know now how to do it... through JSON right? I didn't know it before, I thought it was something difficult to implement, but I've already run some tests and I'm ok now. In question 3 I was referring to the wmpkit library, sorry for the error. But I browsed the js file and already know what it does. For the other questions, you have already enlightened me! ;) I'll browse the web for APIs so that I can develop some useful widgets. hehehehehe Thanks a lot!
0
Hi Dominik, How are you doing in Dusseldorf? I'm currently hired by Vodafone in Maastricht squashing some Vodafone My Web bugs today ;-) The reason I used the openURL JS way was because I triggered a function in my widget after a user clicked on a DIV. I'm not sure if the following will work:
<a href="sms:?body=helloworld"><div>Click me!</div></a>
But I'll give it a try! Thanks & cheers, Ernst
0
widget.openURL("sms:?body=helloworld");
Have you tried it with an
<a href="sms:?body=helloworld"></a>
? Could fix the browser issue. Cheers Dominik
0
Hi pjam, As Dominik said, the api's to interact with mobile data are not yet available. However there is, in case of your question about sending a text message, a "workaround" available. Using the openURL method in javascript you can initiate a URL request in the mobile's native phone browser which triggers the SMS composer with the text that you put in the body field. Like:
widget.openURL("sms:?body=helloworld");
Downside is obviously that the phone browser stays open after sending the SMS and the user needs to close it before returning to your widget. Best regards, Ernst
0
Hi pjam, welcome to widget development ;) To your questions: 1) Those APIs are not specific to widgets they are public available and you can literally use any public API you want, e.g Google Maps, Yahoo stocks, openstreetmap... 2) You can use a remote database on a server, for example the amazon S3 (simple storage service) or simpleDB. You might also want to look at zembly.com which claims to offer storage as well (I haven't tried it yet). 3) I don't know to which webkit you're referring here, our widget runtime is based on Opera Mobile technology. 4) Those APIs you're asking for are not yet available, but we're working on it, stay tuned! Cheers Dominik

Login and answer the question