Small problem with App Inventor and Sound - Touch Pro2, Tilt 2 Android General

I'm pretty new to XDAndroid so apologies if I'm doing this wrong.
I've been playing around with Google App Inventor and run into an issue with sounds. I thought I'd pass this on just in case it's pointing to a potential problem (I have no idea).
If I add a sound component with an mp3 source to an app it doesn't work on the phone, though it works in the APP Inventor emulator. But if I attach a wav file instead, it works. Also if I use the Player component, it works.
I'm running the latest kernel on a RHOD500. Here's the relevant part of the log file in case this is of any interest.
I/ActivityManager( 1444): Starting activity: Intent
{ act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000
cmp=appinventor.ai_Ca
rld256.HelloPurr/.Screen1 }
D/Form ( 1893): Form got onResume
I/Sound ( 1893): Got onResume
I/Sound ( 1893): Unable to play. Did you remember to set the Source
property?

Taking a wild guess here. Remove all tags from the MP3 (using something like Mp3tag for windows).
Maybe there's an 'invalid' character in the file name?
Perhaps the phone is trying to find the codec and can't?
I have never messed with this stuff, just throwing ideas around

A tag issue sounds likely. I'll try that soon as I get Android set back up.

Heh, Would be right.
Have a look at this: http://forum.xda-developers.com/showthread.php?t=1096895

ryannathans said:
Heh, Would be right.
Have a look at this: http://forum.xda-developers.com/showthread.php?t=1096895
Click to expand...
Click to collapse
Yep, it seems to have been a tag issue. I ran meow.mp3 through Mp3tag and it works on the phone now. At least I know what to do next time I run into this problem. Thanks much.

No problems, glad I could help

Related

OpenGL ES 2.0 games possibility

I've been hankering to start porting a game I've been working on(originally was going to be for Zune HD but they haven't released the damn 3D SDK. Video of it running in windows is available on youtube, where my username is marcusmaximus04) to android but was hesitant due to the lack of OpenGL ES2.0 support in the Android SDK. However, looking through the file system on my nexus one, I spotted the file libGLESv2.so, which appears to be the shared object file for exactly this!
Obviously, I still can't use the normal SDK to use this, but in theory, one could use the NDK to use OpenGL ES 2.0 features(shaders, etc) through that shared object file.
The purpose of this post is three-fold. One I want to know if anyone has any background with using OpenGL through the NDK or knows of any tutorials for doing so(I'm not entirely sure how that would work...). Two, I wanted to bring this to the attention of all the devs out there who might be holding off from using ES 2.0 features. And three, I wanted to let everyone else know that such a thing is possible, just 'cause it's exciting.
At any rate, even if I can't find any tutorials I'll probably start plugging away at getting this to work and this should make for an exciting couple weeks/months.
Since we have this pretty well working(even on non-rooted phones) I'll post a sample apk. It doesn't look like much, but it does prove that we're using OpenGL ES 2.0(this will only work on the Nexus One). I'll also post the libGLESv2_adreno.so shared library in the same zip file. Enjoy .
From http://developer.android.com/guide/topics/graphics/opengl.html:
note that though Android does include some basic support for OpenGL ES 1.1, the support is not complete, and should not be relied upon at this time.
Click to expand...
Click to collapse
so official 2.0 support might be a bit off :/
kozm0naut said:
From http://developer.android.com/guide/topics/graphics/opengl.html:
so official 2.0 support might be a bit off :/
Click to expand...
Click to collapse
Possibly, but it does still support it in the NDK(really, this hardcore graphics stuff should be done in the NDK anyway). Even there it's not really official, but they aren't likely to change the API calls since those are already set in stone by khronos.
Hi Marcus,
to get started, grab the OpenGL ES 2.0 headers from www DOT khronos.org/registry/gles/ and copy the library file from your phone to the NDK installation dir (build/platforms/android-4/arch-arm/usr/lib/). Next you might inspect the libGLESv2.so with objdump to see what functions it provides:
build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/arm-eabi-objdump -t libGLESv2.so
It should have the 2.0 functions like glCompileShader(), glCreateProgram(), etc.
Finally, add the following line to the Android.mk file in the jni/ directory of your Android project:
LOCAL_LDLIBS += -Lbuild/platforms/android-4/arch-arm/usr/lib -lGLESv2
If you're lucky, that should allow you to compile and link OpenGL ES 2.0 code. I cannot try this right now but will as soon as I get my Nexus One on monday
I haven't done any OpenGL ES coding with the NDK, but it should be straightforward if you've written OpenGL (ES) code before. This might be of use: code DOT google.com/p/glesquake/
robert-qfh said:
Hi Marcus,
to get started, grab the OpenGL ES 2.0 headers from www DOT khronos.org/registry/gles/ and copy the library file from your phone to the NDK installation dir (build/platforms/android-4/arch-arm/usr/lib/). Next you might inspect the libGLESv2.so with objdump to see what functions it provides:
build/prebuilt/linux-x86/arm-eabi-4.2.1/bin/arm-eabi-objdump -t libGLESv2.so
It should have the 2.0 functions like glCompileShader(), glCreateProgram(), etc.
Finally, add the following line to the Android.mk file in the jni/ directory of your Android project:
LOCAL_LDLIBS += -Lbuild/platforms/android-4/arch-arm/usr/lib -lGLESv2
If you're lucky, that should allow you to compile and link OpenGL ES 2.0 code. I cannot try this right now but will as soon as I get my Nexus One on monday
I haven't done any OpenGL ES coding with the NDK, but it should be straightforward if you've written OpenGL (ES) code before. This might be of use: code DOT google.com/p/glesquake/
Click to expand...
Click to collapse
Alright! Thanks for the help. I've done a lot of opengl work before and a little bit of opengl es when i had my g1 but haven't ever used the ndk, so that'll get me started.
EDIT: Sweet, I've dumped the list of functions available and it looks like all the appropriate shader functions are there. I'm attaching the full list output from my computer. I actually had to use arm-eabi-strings, since the objs one showed no objects. Regardless, it's looking good on the OpenGL ES2.0 front, and I've already looked into running opengl code from the NDK which is perfectly possible and ok.
ANOTHER EDIT: Haven't quite gotten it to build yet, but I got it to load gl2.h without any complaints. Now I just have a crapload of errors because the sample project I was using(from the ndk samples, san-angeles) was written for OpenGL ES 1.0 and all the things now done in shaders no longer exist(GL_LIGHTING, GL_MATERIAL, etc). Regardless, I'm considering this a success so far, since all that is expected.
YET ANOTHER EDIT: It runs! I'm not displaying anything yet(so it's not really a good test), but I got the shared library to build using OpenGL ES 2.0 and it runs on my phone. Gonna implement a simple program to display a triangle or something just to prove it works and will provide source code/binaries here(also, if anyone has a Droid or knows someone who does, it'd be great if we could test out to make sure this works on the Droid as well)
I just wanted to drop in and say I'm very interested in what y'all are doing I'm of very good at coding. All I know is Java but ill definantly be following yall and keep up the good work
Decided to post a reply, rather than just adding to that one post.
Well, I encountered a fairly large roadblock:
Code:
E/libEGL ( 3366): called unimplemented OpenGL ES API
That's what I see now every time I call one of the functions dealing with ES 2.0. I'm hoping there's another library I can use that'll make that go away, but we might not be as easy as I thought to do this.
That's bad news indeed. I was hoping that everything is in place and Google just didn't release a new NDK with ES 2.0 support yet, but if the libGLESv20.so is merely a stub, we're pretty much out of luck. I'd probably disassemble the file to see if there's actually some code besides "return unimplemented" in there, but even if there was, I'd have no idea on how to continue...
I'm wondering how they render the fancy rain drop effect on the wallpaper. Looks like a perfect fit for a 2.0 fragment shader, however there are a lot of other ways to create that effect.
robert-qfh said:
That's bad news indeed. I was hoping that everything is in place and Google just didn't release a new NDK with ES 2.0 support yet, but if the libGLESv20.so is merely a stub, we're pretty much out of luck. I'd probably disassemble the file to see if there's actually some code besides "return unimplemented" in there, but even if there was, I'd have no idea on how to continue...
I'm wondering how they render the fancy rain drop effect on the wallpaper. Looks like a perfect fit for a 2.0 fragment shader, however there are a lot of other ways to create that effect.
Click to expand...
Click to collapse
Well I managed to view the assembly code, but can't get it into any form that I can/want to read(I know how to read assembly but unless you spend hours with it, it's damn near impossible to decode anything. Plus, I haven't looked at ARM assembly before). Know of a good program to convert it into C?
At any rate, I'll attach the disassembler dump(ran it using arm-eabi-objdump with flags -DS). From looking at it briefly, all the implemented functions look like they might be stubs since they're pretty bare bones and have almost all the same instructions(with a slight modification to one single instruction). But it's hard to tell with assembly. Let me know if you can make anything of it. I had to attach the file in a .zip by the way because it was too big.
SUCCESS!!!! So, it looks like those functions were stubs. Google seems to have done it intentionally for whatever reason. They took the .so that actually worked(libGLESv2_adreno200.so) and shoved it under /system/lib/egl, which the ndk doesn't seem able to access(gives you a runtime error if you linked against it). However, If you just copy that file to /system/lib (yes, this requires root unfortunately) then you can use it. I successfully drew a triangle using shaders .
I'll try to get it to attach that xxx_adreno200.so file to the .apk so it can be used without messing around with such things(and work without root). If I can, then I'll throw it on here so everyone can see. Right now it's just a triangle, but tomorrow: the world.
EDIT: Alright, I attached the .apk(it's in the zip file, xda still doesn't allow posting .apks). I tried to attach the libGLESv2_adreno200.so library to it, so it wouldn't require moving the local one but it just wouldn't accept it. So, at least for the mean time, if you want to actually run that app without having it crash you'll have to do an adb remount and then the following in the terminal(or adb shell) as root:
Code:
cd /system/lib/egl
cp libGLESv2_adreno200.so ../
Once you do that, when you run the app it should display a yellowish triangle on a blue background(it was from the second tutorial from the OpenGL ES 2.0 sdk for PowerVX). Like I said, it's not much right now, but it is using custom shaders to display that triangle.
ANOTHER EDIT: I decided to change the test program a little. All I changed was the fragment and vertex shaders, which I made to change the color of the pixels based on where they are on the triangle. This should show(to those of you who know OpenGL) that it really is using custom shaders, since it's one triangle and it's clearly not using fixed-function pipeline shading .
Awesome work on reverse-engineering this! Keep us posted.
Indeed, keep at it Marcus! Very interested to see how this progresses.
Well done, Marcus! I'm glad you found that working library.
You should be able to embed the library search path in your own library by using the rpath directive while linking your program. See "man ld" for more information. You need to get the NDK to call the compiler like this:
gcc ... -Wl,-rpath=/system/lib/egl
That should allow you to use that library without copying it around, and therefore make it work on non-root phones as well.
I guess all you need to do is add the directive to the LOCAL_LDLIBS variable in Android.mk, or maybe it has LOCAL_LDFLAGS, which would be more appropriate.
robert-qfh said:
Well done, Marcus! I'm glad you found that working library.
You should be able to embed the library search path in your own library by using the rpath directive while linking your program. See "man ld" for more information. You need to get the NDK to call the compiler like this:
gcc ... -Wl,-rpath=/system/lib/egl
That should allow you to use that library without copying it around, and therefore make it work on non-root phones as well.
I guess all you need to do is add the directive to the LOCAL_LDLIBS variable in Android.mk, or maybe it has LOCAL_LDFLAGS, which would be more appropriate.
Click to expand...
Click to collapse
Ya, I tried adding it to LOCAL_LDLIBS, but that just seemed to make it use that path for the local library on my computer when building it. It still failed to find that library on my phone when I ran it. I'll try poking around a little more since that would obviously be ideal.
Alright. Are you sure you used rpath and not rpath-link?
BTW, there's a libGLESv2.so in the 2.1 emulator image. Did you try using that? I wonder if the emulator supports ES 2.0...
robert-qfh said:
Alright. Are you sure you used rpath and not rpath-link?
BTW, there's a libGLESv2.so in the 2.1 emulator image. Did you try using that? I wonder if the emulator supports ES 2.0...
Click to expand...
Click to collapse
I didn't touch either actually, just changed the name of the library and the path it had. I haven't done a lot of make files beyond the most basic operations so a little study might be necessary.
Haven't tried the emulator image one, but the one from the phone just had those stubs. It would be really strange if the emulator had the actual functionality and the phone didn't.
I think you're right that if there's hope then it lies in the makefile, so I'll keep looking into that.
EDIT: Just tried adding --rpath=/system/lib/egl everywhere I could possibly think of and all with no change.
Hmm I can't try this yet, but it looks like it uses the property java.library.path to determine where to look for shared libraries. Maybe I can have it look in /system/lib/egl too?
Ack, tried it, didn't do anything. Still can't find that library.
So ya, I'm giving up on this front for now. Google obviously has some of this ready but doesn't want us using it for now, so I'll just wait for them to give us access unless I get some new info. In the meantime, I'll continue the work I've already started on porting that game from the video I linked to. At least we now have the tools to test this stuff.
[email protected] said:
Hmm I can't try this yet, but it looks like it uses the property java.library.path to determine where to look for shared libraries. Maybe I can have it look in /system/lib/egl too?
Ack, tried it, didn't do anything. Still can't find that library.
So ya, I'm giving up on this front for now. Google obviously has some of this ready but doesn't want us using it for now, so I'll just wait for them to give us access unless I get some new info. In the meantime, I'll continue the work I've already started on porting that game from the video I linked to. At least we now have the tools to test this stuff.
Click to expand...
Click to collapse
thats depressing i was checking this thread like 10 times a day waiting for new info to popup lol call me obsessed but i respect your work
Yet another idea to try. On Linux you can specify the library search path using the environment variable LD_LIBRARY_PATH, e.g. if you run a program like this
LD_LIBRARY_PATH=/some/path /path/to/program
then the linker will search that path for libraries.
Maybe it's possible to set that variable from within the Java code, but before the JNI library is loaded:
static {
// Set environment variable LD_LIBRARY_PATH
System.loadLibrary("your_jni_lib");
}
Finally another idea, so we cannot link our library to the OpenGL ES library. But we could probably dlopen() it from within the JNI library and grab all the function pointers using dlsym(). I will get my Nexus One in a few hours, and ES 2.0 will be one of the first things I'm going to look into
EDIT: Marcus, would you mind posting the source code of your ES 2.0 triangle demo application? Basically all I need is the gl....() stuff. I haven't done too much Shader stuff so far, so that would save me a lot of time.
robert-qfh said:
Yet another idea to try. On Linux you can specify the library search path using the environment variable LD_LIBRARY_PATH, e.g. if you run a program like this
LD_LIBRARY_PATH=/some/path /path/to/program
then the linker will search that path for libraries.
Maybe it's possible to set that variable from within the Java code, but before the JNI library is loaded:
static {
// Set environment variable LD_LIBRARY_PATH
System.loadLibrary("your_jni_lib");
}
Finally another idea, so we cannot link our library to the OpenGL ES library. But we could probably dlopen() it from within the JNI library and grab all the function pointers using dlsym(). I will get my Nexus One in a few hours, and ES 2.0 will be one of the first things I'm going to look into
EDIT: Marcus, would you mind posting the source code of your ES 2.0 triangle demo application? Basically all I need is the gl....() stuff. I haven't done too much Shader stuff so far, so that would save me a lot of time.
Click to expand...
Click to collapse
Sure. I'll post it when I get home from work tonight. I don't have anything proprietary in there yet.
For the setting of the environment variable, from my understanding that's basically what System.SetProperty("java.library.path"... is supposed to do. But it still couldn't find the library and didn't seem to have any effect.
The dlopen bit might work. I was thinking of trying that but haven't had any time. I'm not really too sure on how these shared libraries are used, whether once they're open any other program can find and use them or whether the path to them has to be given explicitly at link time for the program that wants to use them and just generally having one loaded won't help.
EDIT: By the way, @pr0cl1v1ty: Don't worry, I'm not going to stop digging into ES 2.0 entirely. I'm just not going to be pushing as much for getting it to work on non-rooted phones. I've got bigger fish to fry.

song(mp3) renaming

Does anyone know a way I can change the artist name and album names on my songs sooooo that they show up in the right spots?
I have songs that I got from download sites and just want to make them all show up under the correct artist.
I will try to explain better if that was confusing.
Any ideas?
Even if I have to hook up toa computer what program would I use to rename them?
You probably just need to edit their tags. There are various free mp3 tag editors that you can use in Windows. Also, a lot of media players have built in support for it. I don't know which one to tell you to use but I use Media Monkey. WinAmp may have the ability to do it too, I don't really know as I haven't used it for years.
Also, if you are using Windows 7, you can just right click on the file>properties, click the details tab and edit them there. You can do more than one at a time this way by clicking on the first file you want so it's highlighted, then, while holding the shift key, click on the last one you want. The first, last and everything in between will become highlighted. Then just right click on one of them and choose properties, then details. Edit it and the changes should be applied to all of those that you selected.
Perhaps XP has the same ability. I don't really remember as it's been a while since I've used it. I can fire up a VM and check it out though if you'd like. Or, if you have XP, just have a look and see for yourself.
robocuff said:
You probably just need to edit their tags. There are various free mp3 tag editors that you can use in Windows. Also, a lot of media players have built in support for it. I don't know which one to tell you to use but I use Media Monkey. WinAmp may have the ability to do it too, I don't really know as I haven't used it for years.
Also, if you are using Windows 7, you can just right click on the file>properties, click the details tab and edit them there. You can do more than one at a time this way by clicking on the first file you want so it's highlighted, then, while holding the shift key, click on the last one you want. The first, last and everything in between will become highlighted. Then just right click on one of them and choose properties, then details. Edit it and the changes should be applied to all of those that you selected.
Perhaps XP has the same ability. I don't really remember as it's been a while since I've used it. I can fire up a VM and check it out though if you'd like. Or, if you have XP, just have a look and see for yourself.
Click to expand...
Click to collapse
Thanks bro
I'm gonna try media monkey later.
I had tried to do what you mentioned , couple nights ago, but I could only edit song name with that method. No other details could be changed.
And I am using a laptop (borrowed) that has Vista lol
I'll try those programs you mentioned when I get home from movies tonight...thanks again
Edit......If anyone knows a way I can do it directly from my phone let me know please
I did a search for mp3 tag editor in the market and there's a lot of them available. I have no idea which one would be the one to use though. I've never used one on Android so I don't know if it's a one song at a time thing or of you can find one that supports batch editing. You might have a look. Maybe there's something there you can use.
As for Vista, well, I'm surprised you can't do the same as in Win 7. You're probably right though. The only experience I have with Vista is when I ran the beta MS released and when I've worked on other peoples computers. Didn't like the beta so I didn't really explore it all that much. Went straight from XP to Win 7.
I have used a program called iTag from the market before to edit individual songs. It works fine if you only have a few songs here or there that you want to edit.
I haven't really found anything worth the time if I have to do a lot of editing though. If you have 20+ songs, it is easier to use something like Media Monkey.
robocuff said:
I did a search for mp3 tag editor in the market and there's a lot of them available. I have no idea which one would be the one to use though. I've never used one on Android so I don't know if it's a one song at a time thing or of you can find one that supports batch editing. You might have a look. Maybe there's something there you can use.
As for Vista, well, I'm surprised you can't do the same as in Win 7. You're probably right though. The only experience I have with Vista is when I ran the beta MS released and when I've worked on other peoples computers. Didn't like the beta so I didn't really explore it all that much. Went straight from XP to Win 7.
Click to expand...
Click to collapse
Thanks robot.
U been very helpful for a guy to bust today to Google lol
Mp3tag is the tagger I use. http://mp3tag.de/en/
Poweramp lets you change the tags too and its the best music app out there!
Sent from my DROID X2
dust. said:
Poweramp lets you change the tags too and its the best music app out there!
Sent from my DROID X2
Click to expand...
Click to collapse
Sweet I have power amp...just not installed right now...
Thanks I'll check it out
Hy Guys,
The Win program I use is Easy CD-DA Extractor, been using it for years. Does everything audio you could think or want to do (Swiss Army Knife Of Digital Audio). it's the only one I use check it out. http://www.poikosoft.com/

[Q] Hierarchical structure in Stock MP3 Player - unfunctional? (PowerAmp comparison)

Hey XDA crew!
I´m impressed by the sound of our new SGSIII (bla, bla, worshipping the S3 etc. ).
BUT what I really dislike (and what I´m hating on many audiosoftware products like e.g. the M$ Media Center as well) is the following:
When you are using e.g. PowerAmp, you can see that there is a well organized hierarchical structure when scrolling through your mp3-tagged audio library. For example, when I´m sorting my music by genre, the following screen (after tapping on genre) gives me a list of all artists IN that genre...tapping on an artist there gives me a list of all his/their albums. Easy, neatly arranged, clear.
And this is what it's like in the SGSIII stock player:
Tapping on genre --> the following screen gives my a CHAOTIC messed up list with all the single songs of all albums of all artists in that genre!
Well, perhaps I´m just kind of a geek here, but this is not how to listen to music. Good example: I´m somewhere, wanting to listen to an audiobook. Okay, so lets choose "Audio Books" in the genre. And now everybody should know what I mean: For example, "the hobbit" consists of ~200 single mp3 files...and I have to search them within all the other 1000 mp3 files on my own.
So, the question is: Is there ANY chance of enhancing the stock player with a normal, intuitive hierachical structure?
EDIT:
Nvm thread changed already
Hello
I´ve got the same issue here and i find it very unhelpful, that all tracks are in chaotic order when you choose music by the category "Artist".
But its funny, that the tracks are in correct order when you select music by the category "Album".
Problem is that i have nearly 300 Albums and it is very stressing to scroll through all albums to find the correct one. I´d like to have it sorted by "Artist" and select then an Album.
The Stock Player of SGS and SGS2 doesn´t show this issue.
Didn´t find any solution to this. maybe i stick to a different player until samsung fixes this.
Mate...I can´t believe my eyes...finally someone who finds this system confusing as well
Yeah, for now I´m on PowerAmp again. Considering the lack of interest on this topic (as can be seen here in the thread), I think this will not change in near future^^
Posted this issue on different forums but no one seemed to notice the lack of sorting. For a moment i thought i was allone with this. Even posted this on the Samsung Forum directly, baut they blamed it on the filenames, which i allready checked. Even tried stuff with the tags.
Wrote an Email to Samsung Support. But no answer today.
I think its a simple issue that can be corrected within the next firmwareupdates, because no other model has this problem.
Splatter665 said:
Posted this issue on different forums but no one seemed to notice the lack of sorting. For a moment i thought i was allone with this.
Click to expand...
Click to collapse
Ha, you are not!
Splatter665 said:
Even posted this on the Samsung Forum directly, baut they blamed it on the filenames, which i allready checked. Even tried stuff with the tags.
Click to expand...
Click to collapse
Reminds me of service agents in general. Always knowing what they are talking about
Splatter665 said:
I think its a simple issue that can be corrected within the next firmwareupdates, because no other model has this problem.
Click to expand...
Click to collapse
Hmm I don´t think that this will be changed unless there are more people like us...it is the very same situation on all samsung devices (including the S2 and the note). But let´s be optimistic, hope never dies!
Now i figured out, that the player sorts the Titels by filename, but only when your use "Artist" category.
Tried different things and compared some other albums. When you put a Tracknumber before the Title, the player sorts it like this.
But this leads to a problem regarding Albums with more than 10 tracks, because the order is "1-10-11-12-2-3-4".
You can compensate this with an unorthodox method, something like "101 - Title"
Which leads to another problem, the complete rewrite of the filenames of my entire collection.
But still im wondering why the player sorts in "Artist" by Filename and in "Album" by Track ID. This is very unproductive

[Q] NFC Tag Launcher "Open in Browser" prompt

Whenever I scan an NFC tag I created with NFC Tag Launcher it brings up a prompt that says "Open in browser" with options for OK and Cancel. However, it does not do that for tags I create in Lightflow for turning sleep on or off. Is there any way to disable this prompt?
Can't offer any help but I'm having the same problem with NFC Task Launcher.
I too get this. Not sure why. I'm on a rooted Verizon S3.
Download an app for NFC from the market first, then overwrite the default command that was stored on it. Most likely the command was to redirect you the site of the brand or seller of the tag.
nunyabiziz said:
Download an app for NFC from the market first, then overwrite the default command that was stored on it. Most likely the command was to redirect you the site of the brand or seller of the tag.
Click to expand...
Click to collapse
These are blank tags that I wrote to myself. I click OK every time and it never opens anything in the browser.
Have you verified that it was blank or have you erased the tag yet? I had the same issue with blanks that were not completely blanks.
nunyabiziz said:
Have you verified that it was blank or have you erased the tag yet? I had the same issue with blanks that were not completely blanks.
Click to expand...
Click to collapse
How can I tell if it's blank? According to NFC Tagwriter by NXP it's blank, and according to NFC TagInfo, the first two pages are read-only factory locked..
What do you have using NFC taginfo under "NDEF"?
nunyabiziz said:
What do you have using NFC taginfo under "NDEF"?
Click to expand...
Click to collapse
The blank tags have no message. One that I've written with NFC Tag Launcher has a message of the following:
Code:
WELL-KNOWN: urn:nfc:wkt:U(URI)
Identifier: 0x03("http://")
"tags.to/ntl"
MIME: ntl
enU:2:M:0,Q:-1;O:7;E:h:1__3:M:2;S:2;E:h:0
One written by lightflow has the following:
Code:
MIME: application/vnd.lightflow
SleepToggle
I would imagine the first part is what's causing it, but I don't know what there is to do about it.
EDIT: looks like that URL goes to the play store page for NFC Tag Launcher. Not sure why it's not actually opening in the browser though.
I personally use "NFC task launcher" and "erase tag" option.
---------- Post added at 09:28 PM ---------- Previous post was at 09:25 PM ----------
Sounds like you got it figured out.
nunyabiziz said:
I personally use "NFC task launcher" and "erase tag" option.
Click to expand...
Click to collapse
The issue is that I'm pretty sure it's NFC Tag Launcher that's writing the URL to it when it writes the task to the tag. I don't know what I'd do to write the tasks out to the tag otherwise.
I use NFC Task Launcher's erase function as well. As soon as the tag is written to again, this issue occurs.
jh120 said:
I use NFC Task Launcher's erase function as well. As soon as the tag is written to again, this issue occurs.
Click to expand...
Click to collapse
And did you write a task to the tag after? The NFC tag will always be detect, even blanks. It will just try to launch a unknown command.
nunyabiziz said:
And did you write a task to the tag after? The NFC tag will always be detect, even blanks. It will just try to launch a unknown command.
Click to expand...
Click to collapse
The issue is that the act of writing the task with NFC Task Launcher writes the URI to the tag. So erasing then rewriting the task accomplishes nothing.
I dont know all tags are the same size so maybe my tags are different. Im using web evolved tags and by default until erased and written to the tags will launch my browser and redirect to their site.
nunyabiziz said:
I dont know all tags are the same size so maybe my tags are different. Im using web evolved tags and by default until erased and written to the tags will launch my browser and redirect to their site.
Click to expand...
Click to collapse
Yeah, this isn't caused by anything with the tags themselves, it's just that NFC Tag Launcher adds the URI to the tag when you write out a task no matter what.
I can confirm that this happens regardless of tag type. I erased an old NFC-capable train ticket and wrote a wi-fi toggle to it. It works, but the browser dialog box still pops up.
Yeah, it's NFCTL writing that URL to the tag.
That URL is used as the intent filter and serves a few purposes. 1.) it saves space over a longer custom mime type or application specific record (which stores the package name). 2.) it directs anyone who doesn't have to the app to the play store to get it so that the tag actually does something - an application specific record does the same thing but has to store the *entire* package name (28 bytes in this case).
The way this has worked on *every* other device (and the way it should work in Android) is that the entire NDEF message hits the intent filter for that URL and the message is then delivered to the app. The app then grabs all records from the message (there are two) and parses the second record and executes those actions.
Given what the OP has sent me for some reason the Verizon S3 isn't doing this. (The international and ATT version work as expected).
Given that it's showing the chooser it's missing the specific intent filter and showing a dialog for what to do with this URL:
Code:
D/NfcService( 909): TAG: Tech [android.nfc.tech.MifareUltralight,
android.nfc.tech.NfcA, android.nfc.tech.Ndef]
D/NfcService( 909): Attempting to dispatch tag with override
D/NfcService( 909): No activities for NDEF handling of Intent {
act=android.nfc.action.NDEF_DISCOVERED dat=http://tags.to/ntl (has
extras) }
However it's still delivering the payload to NFCTL as the actions get executed (which it shouldn't do if you're getting the browser chooser dialog). It shouldn't work this way, literally. If you get the chooser it should deliver the entire payload to the chosen app (it's not).
So, what can we do here? I can add an option to use an application specific record in place of the URL. This should ensure it doesn't happen but at the cost of space - you'll lose 15+ bytes of space on the tag as a result though as it will write a separate NDEF record to the tag containing the full package name.
Is there anyone with a Verizon device this *isn't* happening for?
I could in theory get this into a release tomorrow as I'd want to have this squashed pre release.
I've been playing around quite abit with this and I have "sort of" gotten around this by use the Tasker URL Launcher.
With TUL installed along with tasker, I can use another NFC writer utility to create the url of tasker://taskname
Now if I touch the new tag without NFCTL installed I will be prompted with the "New Collected Tag" screen....unfortunately its still not an autorun but I can tap the "new tag" and the sequence fires correctly.
Obviously as previously stated the problem is the interception by the phone of the URL string used by NFCTL. Personally I have rooted and ripped out most all the Verizon bloat so I'm unsure what is left to cause this interception.
Let me know and I'll test whatever.
konman2k4 said:
I've been playing around quite abit with this and I have "sort of" gotten around this by use the Tasker URL Launcher.
With TUL installed along with tasker, I can use another NFC writer utility to create the url of tasker://taskname
Now if I touch the new tag without NFCTL installed I will be prompted with the "New Collected Tag" screen....unfortunately its still not an autorun but I can tap the "new tag" and the sequence fires correctly.
Obviously as previously stated the problem is the interception by the phone of the URL string used by NFCTL. Personally I have rooted and ripped out most all the Verizon bloat so I'm unsure what is left to cause this interception.
Let me know and I'll test whatever.
Click to expand...
Click to collapse
I may add a quick option tomorrow morning and throw a test APK up here. If the Verizon release is anything like the International and US pre-orders I suspect we'll see a lot of downloads and this is a *really* annoying thing to happen. So far Samsung takes the crown from HTC's head as the OEM making the weirdest changes.

[Q] Tasker, Autovoice and yatse

id like to intergrate yatse voice control with tasker and autovoice. id like to be able to say "xbmc" and then have the yatse voice control pop up to open up.
taking it a step further, id like to be able to control xbmc using autovoice itself, for example, open the autovoice popup and say "i want to watch (movie)" and then the system does the rest.
simple in essence, however i cannot find the correct way to do it.
According to the developers if Yatse themselves you should be able to accomplish this with the API.
http://yatse.leetzone.org/redmine/projects/androidwidget/wiki/Api
Not sure but you could try to send an intent with Tasker. Try this for playing a movie:
Profile:
Autovoice recognize:"xbmc"
Task:
Send intent
Action: org.leetzone.android.yatsewidget.ACTION_APP_VOICECOMMAND_PARSER
Extra: org.leetzone.android.yatsewidget.EXTRA_STRING_PARAMS:%avcommnofilter
Target: Service
The %avcommnofilter contains whatever you said after the trigger. Which is 'xbmc' in this case. So the command "xbmc play <movie>" would send org.leetzone.android.yatsewidget.EXTRA_STRING_PARAMS: play <movie> to yatse.
As for play, pause or stop you would use the MEDIA_COMMAND instead of the PARSER.
Let me know if it works. If not, maybe someone else can shed some light. I quite like the idea you've got there.
I don't know what i might be doing wrong, but i tried doing this and i'm not able to get this to work. Is there some special settings i need to have setup on xbmc/yatse?
Update: I got it figured out. Was doing something wrong, but all is good now.
What did you do to get it working.... using the sample above not getting anying
clayboy said:
What did you do to get it working.... using the sample above not getting anying
Click to expand...
Click to collapse
You need to take the spaces out of the action and extra lines. For some reason xda adds them, They aren't needed and are what's screwing it up if you do a direct 1:1 copy of the lines.
stearic said:
You need to take the spaces out of the action and extra lines. For some reason xda adds them, They aren't needed and are what's screwing it up if you do a direct 1:1 copy of the lines.
Click to expand...
Click to collapse
i typed it out without spaces and still unable to play a movie
clayboy said:
i typed it out without spaces and still unable to play a movie
Click to expand...
Click to collapse
Do you have the premium version of yatse?
stearic said:
Do you have the premium version of yatse?
Click to expand...
Click to collapse
yeah... I finallly got it by copying and pasting... just outrageous i spent hours trying to get it to work.... lol... thx now to get tasker to control my amp from avr romte... oh boy:good:
Yea, i spent a few hours only to find out that something didn't copy or paste right so it was all screwed up because of that.
Control XBMC from Tasker & AutoVoice
You know, you can take this one step further and actually control XBMC directly from an AutoVoice command just as you were seeking.
Here's how to do it... http://kinkeadtech.com/2014/08/control-xbmc-from-tasker/

Categories

Resources