Motorola

MOTODEV — The Motorola developer network

  • Platforms
  • Products
  • Docs/Tools
  • Support
    • Overview
    • Technical Support
    • Discussion Boards
    • Contact Us
  • Member Resources

  • Log In
  • ·
  • Help
[Error] [Error] User Search . Advanced
    Comments
    07-09-2009 08:33 AM
    By ohrock Roberto C Serrano (ohrock)

    Two comments.  If you use the Local app (free in the market) and have ASE installed, it will give you an option to trigger ASE scripts when certaint circumstances happen  (you get home, or to work, etc).

     

    Also, if you have the zyxing barcode scanner library installed in your phone (free in the market), you can invoke the barcode scanning from a script, this python code shows how.  Type the following few lines and save them as a .py file:

     

    _______________

     

    import android

    droid = android.Android()

    code = droid.scanBarcode()

    barcode = int(code['result']['SCAN_RESULT'])

    url = "http://books.google.com?q=%d" % barcode

    droid.startActivity('android.intent.action.VIEW',url)

     

    __________________________________

     

    That code will scan a barcode and open your browser and look for the "book" (assuming what you read is a ISBN barcode).

     

    If you want to do the same with a movie, you can replace the line that starts with 'url' with the following line:

    url = "http://www.dvdaf.com/search.html?upc=%d" % barcode

     

    This line will open the browser and point you to the entry for a movie's barcode. From there you canclick in the imd or amazon links.  :smileyhappy:

     

    Enjoy!

    • Permalink
    • Options
      • Mark Article as Read
      • Bookmark this Article
      • Highlight this Article
      • Print this Article
      • E-Mail this Article to a Friend
    • Kudos!
      Thanks!
    Online Support Community Powered By Lithium Technologies
    • www.motorola.com
    • Terms of Use
    • Privacy Practices
    • Contact Motorola
    • Moderated Site

    © Copyright 1994-2008 Motorola, Inc. All Rights Reserved.

    Use this field to search for information ONLY within the discussion boards.
    Use the search field in the upper right hand corner to search the entire MOTODEV web site.