NookReader - Associate ePub files with the stock reader - Nook Touch Android Development

I just got a NST and it looks like the app that I made way back for the Nook Color to load epubs with the stock reader app also works with the NST. Basically, this is an app that registers as an ePub receiver and forwards along the ePub activity to the B&N stock app.
It's very simple, attached is the apk and below is the code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="dev.nookreader">
<application android:label="@string/app_name">
<activity android:name=".NookReaderActivity"
android:label="@string/app_name" android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.NoTitleBar"
android:launchMode="singleTask"
android:screenOrientation="sensor">
<meta-data android:name="noPickRestrictions" android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:host="" android:scheme="file" />
<data android:pathPattern=".*\\.epub"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:host="" android:scheme="file" />
<data android:mimeType="application/epub+zip"/>
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
Code:
package dev.nookreader;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.ComponentName;
public class NookReaderActivity
extends Activity
{
private Intent m_lastIntent = null;
@Override
protected void onStart()
{
super.onStart();
try
{
Intent i = getIntent();
if (m_lastIntent == i)
{
return;
}
m_lastIntent = i;
Intent newIntent = new Intent(i);
newIntent.setComponent(new ComponentName("com.bn.nook.reader.activities", "com.bn.nook.reader.activities.ReaderActivity"));
startActivity(newIntent);
}
catch(Exception e)
{
e.printStackTrace();
}
finish();
}
}
Code:
package dev.nookreader;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.ComponentName;
public class NookReaderReceiver
extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
try
{
Intent newIntent = new Intent(intent);
newIntent.setComponent(new ComponentName("com.bn.nook.reader.activities", "ReaderActivity"));
context.startActivity(newIntent);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}

do you mind if I include your code in my Home replacement?
thread here
class file here

I thought that the stock reader is able to open e pubs?
What does this reader allow you to do?
Sent from my SAMSUNG-SGH-I777 using XDA App

aspellclark said:
do you mind if I include your code in my Home replacement?
Click to expand...
Click to collapse
Go ahead.
switters1 said:
I thought that the stock reader is able to open e pubs?
What does this reader allow you to do?
Click to expand...
Click to collapse
Despite the terrible name, this isn't a reader app. It just registers to receive epub intents and will redirect them in such a way so the stock reader opens the epub. This basically allows you to use a file explorer and click on an epub and have it open with the stock reader. If you try it without my app the stock reader won't open it.

JoshMiers said:
Despite the terrible name, this isn't a reader app.
Click to expand...
Click to collapse
Josh,
Looking for your advice here
I do remember you were working on Almost working: Stock 2.1 Nook Color Reader and Library, figured, you are the right guy to ask!

Thanks for posting this app. It was exactly what I was looking for.
But I noticed a limitation.
The "Last Book" button in the status bar takes me back to the last book which was opened through the Library, and ignores books opened through your app.
Please let me know if anyone has a workaround. Thanks!
once again, terrific work!

JoshMiers said:
I just got a NST and it looks like the app that I made way back for the Nook Color to load epubs with the stock reader app also works with the NST. Basically, this is an app that registers as an ePub receiver and forwards along the ePub activity to the B&N stock app.
...
Click to expand...
Click to collapse
This seems to be the solution to a problem I have on my Nook Tablet running CM7 ROM (off an SD card), which is not being able to use the stock B&N eReader to open epubs that are side-loaded. (However, I have not had this problem with my rooted NST).
Does this app make the B&N stock eReader the sole eReader (i.e., exclusive of other ereaders one might wish to try out) for epubs?

Exactly what I was looking for. Works very well, thanks a lot!

The stock reader already has entries in its AndroidManifest.xml for the mimetype epub.
Android does not really natively have a translator from file extension to mimetype.
Some file managers (like the Open Intents one) use their own internally.
That's why I have never seen this problem, for me, I click on an epub and it opens.
Yes, that application with a file filter can catch intents and relay them on to the stock reader.
Still, if I found that at all necessary, I'd rather just edit the stock reader's manifest for those intents.

Is there also a way to put a link to the default reader app onto the homescreen?
It does not show up in the application list when trying to create a shortcut.

rhhd said:
Is there also a way to put a link to the default reader app onto the homescreen?
It does not show up in the application list when trying to create a shortcut.
Click to expand...
Click to collapse
That's because the Reader has no android.intent.category.LAUNCHER in an intent filter.
Have you noticed that the Reader has no "Open File" option?
If you were to launch the Reader with no context, it would not display anything.
If you want last read book, it's already available on the upper left hand corner.
If you want Library, it's there in the app drawer already.

Renate NST said:
Have you noticed that the Reader has no "Open File" option?
If you were to launch the Reader with no context, it would not display anything.
Click to expand...
Click to collapse
Hmm interestingly that happens sometimes when I open an epub from my file manager (using the tool offered by the OP in this thread).
Renate NST said:
If you want last read book, it's already available on the upper left hand corner.
Click to expand...
Click to collapse
Yes, I do want the last book. (Well, really all I want would be a homescreen link that simply switches to the already running app.) But on the homescreen I have hidden the title bar, so I always have to swipe it down to click that.
Well, no big deal obviously.

hi OP
any chances of making similar apk for pdf's to be loaded with the stock NST reader?

This is not working for me. Running Nexus 7 Jellybean. Is there any reason it shouldn't?

Related

downloading bar color from stock orange to lite blue, any idea?

What do I need to do to change the downloading bar color from stock orange to lite blue?
thanks
Sent from my Mytouch3g cm6rc2 using XDA App
framework-res.apk
progress_horizontal.xml
thanks, im use to switching drawables .png using ninjamorph. now that i found horizontal progress.xml, how do i change the color? do i have to look for the xml file online? or do u have some that u can upload?
thanks
Sent from my HTC Magic using XDA App
Don't quote me on this, but I believe there's just a numerical value to change in the XML file. I haven't looked myself, but it shouldn't be too hard to find. Open it up in Notepad and take a look around.
...or I could be very wrong if so, sorry
this is the contents of progress_horizontal.xml
If you try to open the xml file from the rom it may not come up.
Grab the one from source and it will display something like this:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#ff9d9e9d"
android:centerColor="#ff5a5d5a"
android:centerY="0.75"
android:endColor="#ff747674"
android:angle="270"
/>
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#80ffd300"
android:centerColor="#80ffb600"
android:centerY="0.75"
android:endColor="#a0ffcb00"
android:angle="270"
/>
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#ffffd300"
android:centerColor="#ffffb600"
android:centerY="0.75"
android:endColor="#ffffcb00"
android:angle="270"
/>
</shape>
</clip>
</item>
</layer-list>
Click to expand...
Click to collapse
Once you have made your adjustments then rebuild the rom from source and it should work just fine.
You can use this online tool (amongst the dozens of others) to find your appropriate color.
http://www.2createawebsite.com/build/hex-colors.html
thanks, i will keep these informations for future reference. as for now, i will hold back on this project, thanks again. guess we can close this thread
Sent from my HTC Magic using XDA App
kompheak said:
thanks, i will keep these informations for future reference. as for now, i will hold back on this project, thanks again. guess we can close this thread
Sent from my HTC Magic using XDA App
Click to expand...
Click to collapse
okie dokie

[Q] Help: Samsung epic not viewing apps in android market

So I recently made an android app and published it to the market. However, when i search for my app on my Samsung epic 4g it doesnt show up. I know the app is there and it says that i have published it, but it doesnt appear on my epic. Any ideas why this is? In the manifest of the app i set the minSdkVersion to 5 so it shouldnt filter it out right? is there something special i have to add to the manifest for it to see my app? I would appreciate any help. my current manifest looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=----
package="send.text.fast"
android:versionCode="2"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="5" />
<uses-permission android:name="android.permission.SEND_SMS"> </uses-permission>
<uses-permission android:name="android.permission.READ_CONTACTS"> </uses-permission>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<supports-screens android:smallScreens="true"
android:normalScreens="true" android:largeScreens="true"
android:anyDensity="true">
</supports-screens>
<activity
android:name=".Main"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
android:label="@string/app_name"
app_name = don't you have to put the name of the app there? i know html is different, but usually when you didn't do something simple like that, i would get that kind of problem with a webpage. what if you tried doing that?

[APP] AnyTAG NFC Launcher

What is AnyTAG NFC Launcher?
AnyTAG NFC Launcher is a task launcher app which lets you start tasks by scanning NFC tags.
What can AnyTAG NFC Launcher do?
✔ Bluetooth (on/off/toggle)
✔ Bluetooth discoverable (on)
✔ WiFi (on/off/toggle)
✔ WiFi Hotspot (on/off/toggle)
✔ Connect to specific WiFi SSID
✔ Mobile data (on/off/toggle)
✔ Airplane mode (on)
✔ GPS (on/off/toggle)
✔ Capture photo (front/back camera)
✔ Screenshot - root only (Beta)
✔ Launch an app
✔ Launch an activity
✔ Make a call or USSD
✔ Send an SMS
✔ Open a web page
✔ Navigation
✔ Launch tasker
✔ Silent mode (off/vibrate/mute)
✔ Set volume (ringer/notification/media/alarm)
✔ Auto rotate screen (on/off/toggle)
✔ Auto brightness (on/off/toggle)
✔ set screen brightness
✔ Stay Awake While Charging (on/off/toggle)
✔ Auto sync (on/off/toggle)
✔ Car mode (on/off/toggle)
✔ Display Timeout
And many more feature will add in future updates.
Why AnyTAG NFC Launcher is unique?
"AnyTAG" means you can use any NFC tags. Yes you hear it right, any NFC tags, no matter it is locked or not re-writable.
How AnyTAG NFC Launcher works?
Every NFC tags come with a unique tag ID.
Instead of writing task/action into the NFC tags like what other does.
AnyTAG NFC Launcher let user stored list of tasks and tied it with the NFC tag ID. So when user scanned NFC tag, AnyTAG will recognize the tag ID and perform configured tasks accordingly.
No modification of NFC tags stored data at all.
Why we created AnyTAG NFC Launcher?
We created this simply because we want you save money not to buy expensive NFC tags.
We actually surrounding with a lot of NFC tags,
For example in Malaysia:
✔ Nationality ID (MyKAD)
✔ Payment Card (Touch&Go)
✔ Transit Token (RapidKL)
✔ Parking Token
✔ Members Card
✔ PayPass Credit Card
✔ Visa Wave Credit Card
Benefit of AnyTAG NFC Launcher?
✔ Make your life easier
✔ Save money
✔ Existing NFC tags re-useable
✔ No tag memory size limit
✔ Environment friendly
Download link:
Google Play Store
♥ Want to have AnyTAG in your own language? Unfortunately, I can't speak every languages. Please contact me if you willing to help.
Brilliant ideas & bug report are welcome!!!
XDA Review Video
AnyTAG NFC Launcher DEMO
ov-chipkaart netherlands
i installed this program on my new sIII 32gb and works fine with latest stockrom build IMM76D
nice addition to this is one can use the ov-chipkaart here in netherlands
with this program one can add m.9292.nl to the ov-chipkaart so it would go straight to the website on touch of the chipkaart to the back of the phone :highfive: note: cannot write the chipcard without the proper security key B(this can read and write and is found in the blue boxes) (A is only for reading.. this yellow boxes in the busses) . so dont worry about ruinin the chipcard, it just reads the serialnr and data of the card which is then be used for recognition of the card. it does not write or alter anything on the chipcard itself, however with right key and writer prog it would work :angel:
just briljant..
da_jojo said:
i installed this program on my new sIII 32gb and works fine with latest stockrom build IMM76D
nice addition to this is one can use the ov-chipkaart here in netherlands
with this program one can add m.9292.nl to the ov-chipkaart so it would go straight to the website on touch of the chipkaart to the back of the phone :highfive: note: cannot write the chipcard without the proper security key B(this can read and write and is found in the blue boxes) (A is only for reading.. this yellow boxes in the busses) . so dont worry about ruinin the chipcard, it just reads the serialnr and data of the card which is then be used for recognition of the card. it does not write or alter anything on the chipcard itself, however with right key and writer prog it would work :angel:
just briljant..
Click to expand...
Click to collapse
Thanks for trying out and review
So how does the launcher work after you've created tasks for the tag? In other words, AnyTAG isn't the default app associated with NFC, so it doesn't automatically start up when scanning a tag from the home screen. When I scan a tag set up in AnyTAG, I'm prompted to go to Google Play, because the tag doesn't have anything written to it.
How to I make AnyTAG the associated app for "blank" tags?
I'd like to use this app with the Samsung TecTiles (http://goo.gl/5ECmQ) but am having an issue. The tags launch the Play Store if you don't have the Samsung app installed. So, I can set up the task in AnyNFC using one of the tags, but when I try to use the tag, it just launches the Play Store instead of performing the AnyNFC task. Of course, if I install the Samsung app, it just tries to execute the task programmed by Samsung, not AnyNFC. Any ideas on how I could get AnyNFC to take priority?
I can send a logcat if it would help debug or find a workaround.
Is app can support screen locked phone (sleep)?
Uh, I'm using "NFC Task Launcher": let's try it .
Bye!
! !
After doing some more investigation, I see how the Samsung app is working. Basically there is a preprogrammed NDEF record that is somehow associated to the Play Store, and a package name. Great, that launches the market, but how does the Samsung app process the tag after programming, before the Play Store is launched?
These two lines pretty much give it away:
Code:
I/NfcDispatcher( 673): matched AAR to NDEF
I/ActivityManager( 362): START {act=android.nfc.action.NDEF_DISCOVERED dat=tectile://www.samsung.com/us/microsite/tectile/error?action=settings&bluetooth=on&description=null pkg=com.samsung.tectile cmp=com.samsung.tectile/.TagReaderActivity (has extras) u=0} from pid 673
It seems that the programmed NdefRecord has a payload with some data (the "tectile://" part). Unprogrammed TecTiles have a single payload with a samsung.com web address that redirects to the Play Store.
Now, according to the Android developer docs, the intent ACTION_NDEF_DISCOVERED is launched before any others, and if something handles the intent, then no further intents are attempted. This is where I get stuck. How to get the AnyTAG app to respond to http:// intents or other intents already found on a tag?
Hopefully this helps and something can be done. I'd really like to use this app, or another as the Samsung app is not very comprehensive and limited to one "category" of actions per tag.
EDIT:
One thing I quickly tried was decompiling the APK and adding
Code:
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tectile" android:host="www.samsung.com" android:path="/us/microsite/tectile/error" />
</intent-filter>
to AndroidManifest.xml, in order to match the Samsung app, but it had no effect. Not sure why.
jimbobtexas said:
So how does the launcher work after you've created tasks for the tag? In other words, AnyTAG isn't the default app associated with NFC, so it doesn't automatically start up when scanning a tag from the home screen. When I scan a tag set up in AnyTAG, I'm prompted to go to Google Play, because the tag doesn't have anything written to it.
How to I make AnyTAG the associated app for "blank" tags?
Click to expand...
Click to collapse
May I know what Tag are you using?
kari kimber said:
Is app can support screen locked phone (sleep)?
Click to expand...
Click to collapse
Not for official rom. some custom rom do allow that.
jjohns63 said:
After doing some more investigation, I see how the Samsung app is working. Basically there is a preprogrammed NDEF record that is somehow associated to the Play Store, and a package name. Great, that launches the market, but how does the Samsung app process the tag after programming, before the Play Store is launched?
These two lines pretty much give it away:
Code:
I/NfcDispatcher( 673): matched AAR to NDEF
I/ActivityManager( 362): START {act=android.nfc.action.NDEF_DISCOVERED dat=tectile://www.samsung.com/us/microsite/tectile/error?action=settings&bluetooth=on&description=null pkg=com.samsung.tectile cmp=com.samsung.tectile/.TagReaderActivity (has extras) u=0} from pid 673
It seems that the programmed NdefRecord has a payload with some data (the "tectile://" part). Unprogrammed TecTiles have a single payload with a samsung.com web address that redirects to the Play Store.
Now, according to the Android developer docs, the intent ACTION_NDEF_DISCOVERED is launched before any others, and if something handles the intent, then no further intents are attempted. This is where I get stuck. How to get the AnyTAG app to respond to http:// intents or other intents already found on a tag?
Hopefully this helps and something can be done. I'd really like to use this app, or another as the Samsung app is not very comprehensive and limited to one "category" of actions per tag.
EDIT:
One thing I quickly tried was decompiling the APK and adding
Code:
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tectile" android:host="www.samsung.com" android:path="/us/microsite/tectile/error" />
</intent-filter>
to AndroidManifest.xml, in order to match the Samsung app, but it had no effect. Not sure why.
Click to expand...
Click to collapse
i do not have tagtile tag, if you don't mind i can compile a version for you with the tagtile intent filter. I suspect the same.
Oppss....AnyTAG is featured in XDA TV. Checkout video below
Minute 3:55
wedjohn57 said:
i do not have tagtile tag, if you don't mind i can compile a version for you with the tagtile intent filter. I suspect the same.
Click to expand...
Click to collapse
That'd be cool, I appreciate it.
Not working on VZW Galaxy Nexus 4.1, build JRN84D.
The app runs fine, detects a protected NFC tag on a mouse pad I got. Allows me to set a different action. But when I tap the phone to try the action (any type available) it still does the default action programmed to the tag, which is launch a webpage.
Great app OP, just tried it with my student card which has visa paypass on it and works flawlessly. I'm looking for alarm setting functionality, so I can have a sticker for each day and have it set an alarm at different times every morning.
Good, but some hiccups
Hey there,
Just watched your XDA TV and definiately was curious. I also just found out that my Samsung TecTiles came so I was excited there too! I have a Galaxy SIII (VZW) and once I opened the package the glich happened.
What I'm guessing is that the TecTiles are preprogrammed to send you to download the Samsung App. This superceeds AnyTAG. Once I downloaded it I could use your app. But if anything is programmed on the TecTile it won't launch your app.
Also I'm having forced closing issues. I set up on a lil crazy:
1) Toggle the Wifi
2)Take a picture with the front camera
3) Launch a music player
4)Hit play
5) send a test text message
After it saves the picture then it force closes. I believe it's the camera action. I send a Google Report for you. If I knew how to export it from a stock phone I would.
This may be a noob thing as well but I also tried out NFC Task Launcher, and their tasks take over your launcher too if it's programmed by it.
Geat App, let me know if there is anything else you need.
Hi all, I made a new release. you can get it from google play store.
changelog:
added - car mode
bug fixed - tagtiles (need those have tagtiles tag to verify)
bug fixed - camera capture force closed on some phone model
Hello! I have the same isue that another user: after configuring the tags with AnyTAG NFC Launcher, when I san it again, it launches the default instruccions that where written and not the ones asigned in AnyTAG.
I am currently using a Nexus 7, maybe this can be the problem?
wedjohn57 said:
Hi all, I made a new release. you can get it from google play store.
changelog:
added - car mode
bug fixed - tagtiles (need those have tagtiles tag to verify)
bug fixed - camera capture force closed on some phone model
Click to expand...
Click to collapse
Well it did not fix the Tectiles for me. Both programmed and unprogrammed. The programmed ones will still either open the Tectiles app, or if that is disabled/uninstalled, the Play Store. Unprogrammed tags open a web browser that redirects to the Play Store.
Here is the full AndroidManifest.xml from the tectiles app, in case you haven't looked at it yourself: http://pastebin.com/eXSex2ER. Maybe you can see something that I can't.
Thanks for your help
jjohns63 said:
Well it did not fix the Tectiles for me. Both programmed and unprogrammed. The programmed ones will still either open the Tectiles app, or if that is disabled/uninstalled, the Play Store. Unprogrammed tags open a web browser that redirects to the Play Store.
Here is the full AndroidManifest.xml from the tectiles app, in case you haven't looked at it yourself: http://pastebin.com/eXSex2ER. Maybe you can see something that I can't.
Thanks for your help
Click to expand...
Click to collapse
Yeah, I actually include tectile intent-filter into AnyTAG. it seems like doesn't help too. give me some time to figure out.
This is what i include into AnyTAG manifest:
Code:
<intent-filter android:label="@string/app_name">
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data android:scheme="http" android:host="www.samsung.com" android:path="/us/microsite/tectile/error" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data android:scheme="tectile" android:host="www.samsung.com" android:path="/us/microsite/tectile/error" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
willylatorre said:
Hello! I have the same isue that another user: after configuring the tags with AnyTAG NFC Launcher, when I san it again, it launches the default instruccions that where written and not the ones asigned in AnyTAG.
I am currently using a Nexus 7, maybe this can be the problem?
Click to expand...
Click to collapse
May I know what tag are you using?

Creating a QrCode creator and decoder webapp

Hey guys, so I'm creating this webapp that creates a QrCode based on informations given by the user, decodes QrCodes and creates a log.
I would like some tips, like QrCodes, Image processing, Getting SubImages libraries and API's.
I'm using HTML5, CSS3 and JavaScript. This webapp will be able to Android, Firefox OS, Tizen OS, Windows Phone and iOS devices.
Thanks bros
devcorominas said:
Hey guys, so I'm creating this webapp that creates a QrCode based on informations given by the user, decodes QrCodes and creates a log.
I would like some tips, like QrCodes, Image processing, Getting SubImages libraries and API's.
I'm using HTML5, CSS3 and JavaScript. This webapp will be able to Android, Firefox OS, Tizen OS, Windows Phone and iOS devices.
Thanks bros
Click to expand...
Click to collapse
I suspect you may already be using this, but if not then have a look at using Cordova (or PhoneGap - same thing, at the moment)....
http://cordova.apache.org/
There's a barcode scanner available that is a doddle to use...
https://github.com/wildabeast/BarcodeScanner
Here's a basic page I threw together with just a button that scans all common types of barcode and alerts the result...
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Barcode Scanner</title>
</head>
<body>
<h1>Barcode Scanner Demo</h1>
<p>Hit the button below to scan a barcode!</p>
<button id="scan">Scan Barcode</button>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript">
document.getElementById("scan").addEventListener("touchstart", function() {
cordova.plugins.barcodeScanner.scan(
function (result) {
alert("We got a barcode\n" +
"Result: " + result.text + "\n" +
"Format: " + result.format + "\n" +
"Cancelled: " + result.cancelled);
},
function (error) {
alert("Scanning failed: " + error);
});
});
</script>
</body>
</html>
Attached is a copy of the apk.
Seriously, that plugin is stupidly easy to use
As for creating QR codes, I can't help you with that. I've only ever used online generators when I've done it. Maybe one (or some) of them have a public API you could use?

[Q] Anyone using Tasker on G3?

I am using Tasker on G3 and lower the ringer volume with Cell Near triggering.
Then when the profile active, I checked the settings in volume, it shows me the volume has been lowered.
But when the phone ring, its volume is max.
Anyone using Tasker having the same issue?
Or anyone has ideas on Tasker volume settings?
Thanks a lot.
xpking said:
I am using Tasker on G3 and lower the ringer volume with Cell Near triggering.
Then when the profile active, I checked the settings in volume, it shows me the volume has been lowered.
But when the phone ring, its volume is max.
Anyone using Tasker having the same issue?
Or anyone has ideas on this?
Thanks a lot.
Click to expand...
Click to collapse
I've played with it. It seems a powerful utility if a person learns the 'language'. Years ago I'd spend the time. Now a days you can find an app on PS or elsewhere that probably already accomplishes most of what you can think of, unless it's a long chained macro type of setup. Kinda like T-Rex for the Amiga computer back in the 80's and 90's.
I'd suggest you try automagic, it's a nice little utility...
Jagdish84 said:
I'd suggest you try automagic, it's a nice little utility...
Click to expand...
Click to collapse
It seems that automagic cannot perform much on volume, it can only switching to slient, vibrate, or ring.
The Tasker works fine, but I am only having issues on Ring volume only...
I use it and it works well, here is my task to turn off all sounds and notifications every night.
<TaskerData sr="" dvi="1" tv="4.5u1m">
<Task sr="task11">
<cdate>1410473930226</cdate>
<edate>1414685138861</edate>
<id>11</id>
<nme>Sounds Off</nme>
<pri>10</pri>
<Action sr="act0" ve="7">
<code>304</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>308</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act2" ve="7">
<code>307</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act3" ve="7">
<code>305</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act4" ve="7">
<code>177</code>
<Int sr="arg0" val="0"/>
</Action>
</Task>
</TaskerData>
I'm using tasker for a while now.
I was using tasker with my previous phone, and I use the same profiles with the same settings on my LG G3 now.
And everything still works great.
So I think that the problem has to do with your settings in tasker, and not with the LG G3.
I have tasker as well and have many profiles set up. For example turning WiFi on and connecting automatically when I'm in a certain area or turn location on when I open Google maps. It's a great tool and tool me a little while to use it correctly but once you do it's great.
It would be very helpful for the folks in the know (how) about Tasker, if they'd share their script, with a brief explanation for the literal minded.
Thank you.
Profile that enables location and GPS upon opening Google maps and when exiting to wait 1 minute to turn location off (incase I get a phone call location does not turn off)<br />
1.Then make a new profile for application and choose any apps for location<br />
2. For the task you will choose plug in....then secure settings <br />
3. In secure settings choose SYSTEM+ACTIONS and look for GPS then select on and press save<br />
4. The next task will go back in to secure settings and turn on location services <br />
5. New task back to secure settings and turn location mode to high accuracy <br />
6. Create an exit task that waits 30 sec- 1 min delay in case you get a phone call while navigating<br />
7. Then the rest of the exit tasks turn off GPS and location services in secure settings<br/>
I also use tasker a lot.
I have a profile that switches volumes off during the night and raises it before the phone rings to wake me up.
No problem until now.
By the way I have also a profile that switches wi-fi/data based on cell near location and it works like a charm.
Only you have to periodically check if your phone operator changed same cell.
If you go in the profile condition you have on the top right an icon with a magnifier that contains all the lastest cells reached by the phone. The ones with an "x" beside aren't considered in the profile conditions.
If you touch them one by one then are added to the set of cells used in your profile to activate the corresponding task.
Hope it helps.
JeffDC said:
It would be very helpful for the folks in the know (how) about Tasker, if they'd share their script, with a brief explanation for the literal minded.
Thank you.
Click to expand...
Click to collapse
This guy seems to have covered most things, worth watching a few.
https://m.youtube.com/playlist?list=PLjV3HijScGMynGvjJrvNNd5Q9pPy255dL
Sent from my LG-D855 using XDA Free mobile app
mjb152 said:
This guy seems to have covered most things, worth watching a few.
https://m.youtube.com/playlist?list=PLjV3HijScGMynGvjJrvNNd5Q9pPy255dL
Sent from my LG-D855 using XDA Free mobile app
Click to expand...
Click to collapse
Excellent, thank you.
Thank you for your replies letting me know there's no issues with Tasker on G3.
As I have just changed my phone with my profiles loaded, I need to rescan the "Cell Near" info.
Seems like old Cell Near API is not working good, I am using "Use New Cell Near API" in perference.
Now seems it is working well.
Thank you!!
Jagdish84 said:
I'd suggest you try automagic, it's a nice little utility...
Click to expand...
Click to collapse
Actually Automagic offers several volume and sound functions. Can set each one individually and for multiple events. Language is a lot simpler than Tasker (especially for us NON-programmers)

Categories

Resources