Showing posts with label digital. Show all posts
Showing posts with label digital. Show all posts

Sunday, December 15, 2013

Android Tutorial: Augmented Reality With Digital Cameras and QR Code

With the fast movement of mobile technology, it does not matter which operative system you are using. What matters is to be connected with the technology, the novelty and to keep up with regular updates.  Oftentimes, we talk about things that are unknown to us.  For example,  we can focus on programming experiences where the applications we develop use the digital camera.  Today we will use Android Mobile App Development as an example use case.


 


As good practice for development, it is recommended to focus not only on the hardware functionality in a device, but in the functionally of the whole device. Keep in mind that the rule should fail in the third device that is not being tested. Why?


1. Android is built on the Linux kernel, but Android is not Linux


2. No native windowing system


3. No glibc support


4. Does not include the full set of standard Linux utilities


Another negative is that manufacturers create their own drivers based on Linux whereas Android offers the platform and the environment.  Problems can occur when developing mobile app code by phone range, resolutions and functions.


If you work with cameras, keep in mind that lately the current phones have integrated Camera Front and Camera Back. From developer's side, the code is developed with more functionality and expertise.  However from the user's  side, video chat is adaptable for a front photo. But what happens with devices that only have one camera? Well, you will have to be careful because you will need to recognize the number of cameras in the device. The front camera is labeled by 0 and the back camera with 1 and maybe there could be a third camera with sequential numbering.


After the hardware is recognized, we need to show the focus. One important point to remember when working with native cameras,  is to save steps and call a simple Intent.

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);//Save FilefileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);

When working with custom cameras, use SurfaceView with SurfaceHolder. Callback is implemented taking into account the following overridden methods in a separate class or nested:

     ¬ surfaceCreated
     ¬ surfaceDestroyed
     ¬ surfaceChanged(advisable method for orientation in landscape, portrait, reverse landscape and reverse portrait)
     ¬ Aspect Ratio
     ¬ Size Area
     ¬ Autofocus
     ¬ Flash

 Adding Attributes to a Photograph as Geotag

Some key software and mobile app developer archictecture questions to ask are: Do you need to have the location information in the metadata of each photo in with GPS use. Do you need to record tags with picture information as date, location of the photo taken, time, orientation, white balance, picture size.And how does it work?

There are attributes for setting using ExifInterface class. For example if we want to record the location point, we make use of Location class: get latitude and longitude:

String exifLatitude = exif2.getAttribute(ExifInterface.TAG_GPS_LATITUDE);String exifLongitude = exif2.getAttribute(ExifInterface.TAG_GPS_LONGITUDE);                            exifs.setExifLatitude(exifLatitude);exifs.setExifLongitude(exifLongitude);

From time to time I used to ask myself, if the current products will stop using the typical barcode. Then the QR appears (Quick Response barcode) and maybe it’s not being used 100% of the time as the barcode, but it has much more to offer for marketing purposes.


The Optical Encryption represents an attractive and powerful tool for the safe handling of information. QR,  is used by thousands of people around the world on their smartphones.


How can I read a QR code?


QR codes require a camera to capture the image code. The encrypted code encrypts 4000 alphanumeric characters.


There are several types of codes and not all are the same:

     ¬ Encrypted messages
     ¬ URL
     ¬ Code user-password access
     ¬ Code Wi-Fi access
     ¬ Code to download a program
     ¬ App store download 

We can identify the kind of code with the separation of bits. Text code is much simpler than "download the app" link. Also, we can see that the QR codes can have differnt colors, sizes and strokes.  So there are a lot of combinations to use.


How they are generated?


There are online pages that do it as Kaywa, MSkyNet or INVX. You select which type of QR code you want and write your text, select a picture or provide the URL.  It is easy for any user.


How to Generate the Encryption if I'm a Developer?


The QR code process is 

Obtain an image, text or original URL.The image is converted in QR code.The QR code encrypts the optical method and converted into in new image.The receiver decrypts and obtains the original message. 

There are 2 libraries in Java for manipulating the code:


ZXing Library:  has a QR code generator for java, is actively developed, and is liberally licensed.


QRCode Library: can include support for encoding and decoding codes, correction of errors, and sample applications.


The following Java code illustrates how to create a QR-Code barcode, and output to various formats.

QRCode barcode = new QRCode();     barcode.setData("123456789");        // add more QRCode property settings here             barcode.renderBarcode("c:/barcode.gif");       BufferedImage bufferedImage = barcode.renderBarcode();       byte[] barcodeBytes = barcode.renderBarcodeToBytes();       Graphics2D g = ...     Rectangle2D rectangle = ...     barcode.renderBarcode(g, rectangle);      OutputStream outputStream = ...    barcode.renderBarcode(outputStream);

Explanation

     ¬ Create a QRCode barcode object (line 1)
     ¬ Set QRCode object barcode properties (line 2)
     ¬ Generate QR-Code barcode and encode into gif image format (line 3)
     ¬ Generate QR-Code and output to BufferedImage object (line 4)
     ¬ Generate QR-Code in bitmap and output to byte[] (line 5)
     ¬ Generate QR-Code and draw to defined area (Rectangle2D) on Graphics2D (line 6-8)
     ¬ Generate QR-Code and output to OutputStream (line 9-10)

And there you go! Check out my example for a direct link.


 


That's all for now. I hope you can stop thinking that the digital camera is only good for taking photos or video, do not be a typical user... explore!


Ariana Yadira Lugo is a Computer Systems Engineer and is working on her Masters degree in Internet Technologies. She is currently an Android Developer with nearly 2 years of professional mobile app development experience. She also has experience in Web Development in PHP, CSS, management and design of databases with MySQL and as a network administrator using Fortigate tool. She is a JAVA Sun Certified Programmer with Sun MicroSystems, JAVA Web Component Development with Servlets and JSP Sun MicroSystems and Titanium Certified App Developer (TCAD)


Contact Us


View the original article here

Monday, September 23, 2013

Starwood Preferred Guest app fills digital gaps, enhances guest journey - Luxury Daily

By Staff reports

September 20, 2013


Starwood Preferred Guest app


Starwood Preferred Guest app

Gucci touts heritage in bamboo-handle handbags ads
Italian fashion house Gucci is using two different advertising campaigns to simultaneously promote specific aspects of its handbag collection to appeal to a wider audience of consumers.
Click here to read the entire article on Luxury Daily

Hearst exec: Publishing?s future is 360-degree integration
NEW YORK - A Hearst executive at the Luxury Retail Summit: Holiday Focus 2013 Sept. 18 discussed with a panel of luxury retail experts the ongoing service that publications provide to protect and embellish brand images.
Click here to read the entire article on Luxury Daily


Webinar on Sept. 25: Crafting holiday marketing strategy in an omnichannel, multigenerational and highly promotional environment
Please register now for the free hour-long webinar on Wednesday, Sept. 25 at 2 p.m. on how luxury marketers and retailers must craft holiday marketing strategy in an omnichannel, multigenerational and highly promotional environment.
Click here to read the entire article on Luxury Daily


Luxury Daily?s Classic Guide to Luxury Marketing
While the global economy is going through ups and downs ? trouble with the BRICS, marginal recovery in parts of the EU and regained consumer fervor in the United States ? luxury brands and retailers have managed to hold their own and even grow.
Click here to read the entire article on Luxury Daily


Changing marketing sphere is biggest challenge for small luxury brands: Exec
NEW YORK - An Auberge Resorts executive at the Luxury Retail Summit: Holiday Focus 2013 Sept. 18 said that the hotel chain's small size allows it to swiftly enact changes and develop stronger relationships with its guests.
Click here to read the entire article on Luxury Daily


Fendi microsite increases brand awareness during Milan Fashion Week
Italian fashion house Fendi is generating interest in its spring/summer 2014 collection exhibited during Milan Fashion Week through a microsite that features interactive and behind-the-scenes content.
Click here to read the entire article on Luxury Daily


Starwood Preferred Guest app fills digital gaps, enhances guest journey
Starwood Preferred Guest, the loyalty program from Starwood Hotels & Resorts Worldwide, introduced iPad and iOS7 applications meant to further synchronize the brand's properties, unite guests and make traveling a more fluid experience.
Click here to read the entire article on Luxury Daily


Four Seasons to raise breast cancer awareness via month-long culinary initiative
Four Seasons Hotels and Resorts will show support for National Breast Cancer Awareness Month this October with a "Think Pink" campaign that spurs its chefs and mixologists to create pink cocktails, teas and desserts to benefit breast cancer charities.
Click here to read the entire article on Luxury Daily


Neiman Marcus, Gucci, Tesla and Daimler ? News briefs
Today in luxury marketing - Neiman Marcus profits rise; Gucci continues to chime for change; Tesla moves ahead from Google in race to build self-driving cars; Daimler bids for German barracks as Cold War armies fade.
Click here to read the entire article on Luxury Daily


Calling for nominations: Luxury Women to Watch 2014
If you know a smart woman in luxury advertising, marketing, media or retail who's set to go places, please nominate her for Luxury Daily's Women to Watch 2014. Nominations accepted through Sept. 30.
Click here to read the entire article on Luxury Daily


Contemplating the future of shopping malls
Is a retail dust bowl about to blow through the mall nationally? That is a question worth asking for its long-term implications.
Click here to read the entire article on Luxury Daily

Sign up to receive Mobile Marketer Daily. The premier mobile marketing publication. Free!


View the original article here