Including a QR-scanner application with PhoneGap - android

I starting to write an application that will need to have a QR code reading capabilities embedded in it. Meaning that I basically want to have an option from inside my application to scan a QR code and then perform some logic related to my application.
I got some explanations about how to do it in Android (though haven't tried it yet), but now that I've decided to use PhoneGap I want to know if it changes anything.
Does the usage of PhoneGap mean that I will have a generic way to include a QR-scanner application inside my own application, or do I still need take care of the QR-scanner application including for every platform?

Advanced features like this require a PhoneGap plugin, with an native implementation for each platform. See http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins
The good news is that the BarcodeScanner plugin is already implemented for Android, BlackBerry and iOS, see https://github.com/phonegap/phonegap-plugins
This plugin support 1D barcodes as well as QR codes and other 2D codes by integrating ZXing (http://code.google.com/p/zxing/)
Note that for now, integrating a plugin in a PhoneGap application needs a different procedure for each platform. See the PhoneGap Wiki referenced above as well as build & install instructions in the README file for each plugin.

Related

Opentok module for Titanium SDK that supports both Android and IOS?

I am developing a mobile application using Titanium SDK. This is my first mobile app. Most of the app is done successfully. The only module that remains is Video conference support. The company I am working in has chosen to use Opentok SDK. I finished the web application and it works fine. Now I've hit a wall in mobile app and can't move further. The problem is Opentok provides a module to use for Titanium, But it only supports build to IOS not Android. The reason we chose Titanium is for cross platform support.
Is there any module available to use or any other way to implement Opentok with Titanium that builds into both Android and IOS.
I have already tried using a WebView to open the conference module of web application. But bad luck, Opentok only works with chrome browser in mobile. But WebView utilizes native stock browser which does not support WEBRTC. So, opentok doesn't work with webview too.
Please help me. This is my first app and I am stuck at this point.
To Create a Module for OpenTok Android:
These are the steps I would follow.
Create a new Android module: titanium.py create --type=module --id=com.tokbox.ti.opentok --platform=android --name=opentok-titanium
Follow the installation instructions from OpenTok for Android. (Hint: I added a separate section down below to help you get through their instructions.)
Make sure the module runs: ant run.emulator or ant install.
Try running their sample, fully in JAVA, completely separate from Titanium. Make sure it works, and you know what it should look like. Then, figure out what exactly you need from their API. Or, if you're feeling ambitious, decide you want everything. Work to strip down the example to just the surface area that you need. Simplify it down to the least number of files you feel makes sense.
Write an example/app.js that demonstrates how you want the module to be used. For example, maybe you'd start off by requiring the module, then setting some API + Session keys, then calling some API, etc.
Based on the documentation, port what you need in to your module. Reference the Appcelerator Android module dev guide and open source Android modules for inspiration.
Write documentation for the module to specify what the various properties, methods, etc are, so that other developers can figure out how to use the module.
When you're done, submit a PR to OpenTok and revel in your creation and contribution.
Some Hints for Step 2:
.jar files go in lib/.
.so files go in platform/android/libs/armeabi/
Permissions go in timodule.xml, and you can see an example in the open source PayPal module for Android
OpenTok does not work with WebView. OpenTok support for Titanium Android does not currently exist because it is currently in beta and we don't currently have engineering bandwidth to build a Titanium Android integration. However, if you are familiar with Titanium, you are more than welcome to add the integration yourself and send a pull request. You can get the Android beta here and you can get titanium source code here
If you are in a hurry and open to trying other frameworks, our PhoneGap Plugin currently supports both android and ios.

Convert android app to IOS using phonegap?

I developed an android application with Phonegap and I want to convert it to iOS as well. Before starting my project I heard that we are able to convert same project with multiple platforms using phone gap. But now I don't know how to convert my project to IOS. Can any one suggest good tutorial OR examples to do it.
And also mention what are all prerequisites to convert my android application to IOS using phone gap.
Suggest me some tutorials with examples.
With phongap you can target all platforms including iOS, android and windows etc. using HTML 5, avoiding each mobile platforms' native development language. Code base remains same for every platform. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's sensors, data, and network status. refer docs http://docs.phonegap.com/en/3.2.0/guide_overview_index.md.html#Overview
Phonegap is not for converting one build to another.. Using phonegap you can develope for all platforms using phonegap framework, you can generate .apk,.ipa,ota, etc as you wish using sdk in your pc or using phonegap build service. You can read here(phonegap authentic doc) how can you do it for different plaforms.
Nb:Phonegap provides complete documents in their site itself, you can go through and understand, it is helpfull.
You can build on each platform. If you don't want to do that, they offer a Build service that build your app on each platform for you. See https://build.phonegap.com/ for more info.
With phonegap you can create all platform application with same package just you need to clear yourself that for IOS you need certificates to build it. Otherwise same package you are using for android can use for IOS also.

Use Phonegap for SDK developement

I am developing a native SDK which is integrated into a native app ("host app"). The app is calling my SDK method and this method will open a Webview (both for iOS and Android).
I looked into Phonegap as a solution, and saw that it gives me a platform for opening a Webview and communicating with the device. While this is ok, I cannot find a way to build this as the "SDK app" that I wanted, triggered by host native app, without writing the native code for that myself (duplicating my code for iOS and Android and dealing with native code).
Does Phonegap (or other platforms) have the ability to add a native logic (and not only webview) without the need to duplicate my code?
tnx!
Yaniv
PhoneGap is for developing apps. It is not really for third parties to create a library for others to use. While you can try to twist PhoneGap (and similar solutions) to serve that role, that will add extra baggage for anyone who would want to integrate with your library.
Hence, I suggest that you just create a library, sans PhoneGap.

How the html5 works as a cross platform?

I am currently looking for a cross platform technolgy for my Android App, I come to conclusion of HTML5,I tried some sample code and some Native applications using PhoneGap.
I'm little confused about Native Application(Using PhoneGap),It Uses .java files for writting plugins for Android, now if I want to develope same App for Windows,should i need to create new plugins for windows phone?.
(I'm working on NFC project in android.The plugins for NFC in android are available at
http://phonegap.com/2011/09/26/building-an-nfc-enabled-android-application-with-phonegap/
)
Yes. You will need to create plugins for different platforms that you use. You can use the base set of API's everywhere but if something does not exist, then you'll have to create a plugin for it in the platform's native language. You can contribute these plugins as open source back tot he community so others can use it as well.
See the plugin development guide here:
http://docs.phonegap.com/en/2.1.0/guide_plugin-development_index.md.html

Unity3D for Android and iOS: QR-Code Decoding (Reader)

Is there a good QR Decoding Script or Pluging for Unity3D (Android and iOS)?
Or has someone already successfully integrated ZXing in Unity3D for Android and iOS? Here is a good solution for Webcam, but WebCamTexture does not always work on Android :(
I am grateful for any help.
There is a non-Free ($50) plugin available: Antares QR Code
If you're not interested in paying for a plugin then you'll have to create your own. Since ZXing is available for both iOS and Android you can create C# wrappers for it and then use a native plugin on iOS and the C#-to-Java extensions on Android to get what you need.
There is also an other plugin available for barcodes and QRCode for both Android and iOS : Easy Code Scanner
You just have to call a single method (common C# API for Android and iPhone) and it automatically launches a camera view/preview that decodes the barcode/QR code and gives you back the literal string of it in a callback. It is based on ZBar and you have nothing to integrate, everything is already self packaged.
The plugin can give you back the picture taken during the preview (as a Texture2D/Image) and also decode directly in the scripts a Texture2D/image without camera preview/shot.
The blog that the OP linked to, now has a free option for Android devices here You can also check out this related video
ARCamera prefab in Unity Tutorial
You may need to fix some minor compile errors to get everything working due to newer versions of Vuforia having different implementations.
You can also use free metaio SDK which has built in support for QR codes reading.

Categories

Resources