Wednesday, September 12, 2012

How to Ask Me a Question

Hey all,

I love helping people out with their PhoneGap/Cordova issues but I do have a day job and sometimes even a home life. It would really help me out if you would provide me with enough information in order to answer your question. In fact I hate to be an ass about this but I'm letting you all know that I'm not going to answer any questions that are along the lines of "it doesn't work". That just isn't helpful. I can't read your mind I don't know how you are using the code.

Here is my advice to you on how to speed up getting a good answer to your query:

Search the PhoneGap mailing list archives

Your question may have already been answered. Make sure you search at least PhoneGap Google group archives before you ask question Go to the PhoneGap Google group and use the search field in the top right of the page.

Provide details


Give as many details as possible. Incomplete questions won't likely be answered.

Include the following at a minimum:
  • what version number of PhoneGap are you using? 
  • which platform and version you are testing on? iOS 4.0, Android 2,2, BlackBerry 6.0, etc. 
  • a detailed description of your problem.
  • is this happening in the emulator only, phone only or both? 

Select a concise, informative subject for the post. For example, include:
  • Platform, if issue is specific Android, iOS, etc.
  • Keyword examples: version, jar file, phonegap plugin, deviceready event, build
  • Short phrase summarizing the problem

You may also want to include:
  • some sample code that illustrates the problem.
  • logs taken while the problem was reproduced.

If the code or logs are huge, let's say over 20 lines please think about using  a web service like Gist or Pastebin.com.  Alternatively if you have a Dropbox account put the file in your public folder.  Then share the link in the question rather than posting a tone of text.

An example of question


Wrong:

PhoneGap does not work for me!

Right:

I get a security error on PhoneGap 0.9.4 when I try to open a database using the Android 3.0 emulator.  You can see the code I used here: https://gist.github.com/937307 and the logs I collected here: https://gist.github.com/937315.  I have looked at the archives and the commits but did not find any solution. Does anyone know what could be the issue and whether this has been fixed?

Also, for detailed back and forth the blogger comments are not the best place so I encourage you to ask me questions over at my Formspring account.

Thanks...

Simon

4 comments:

  1. Hi ,
    My question how phonegap interally detects which device is being used.
    i.e when request come from webview how does phonegap knows that it has to hit android native or ios native.

    thanks,
    raj dugar

    ReplyDelete
  2. @raj dugar

    Each platform has their own version of Cordova.js and a platform specific library.

    ReplyDelete
  3. Hi Simon,

    How are you?
    I used your TTS plugin for my cordova android projects and it works great. my clients are really happy with the TTS feature and all credits goes to you.

    Simon i need a help from you, i dont have much experience in java and for my android projects i need to add Calendar feature where a person can add events to its calendar from the app. I tried working around with java but didn't get any success.

    It would be really helpful if you can make Calendar plugin for android devices.

    Thanks,
    Arjun.

    ReplyDelete
  4. @Vishal

    It is a great idea for a Plugin however I just don't have time to get into it right now. The other limitation was the Android SDK did not include a calendar API until Android 4.0.

    ReplyDelete