IR (InfraRed) Port API [6/19] - MCE Remote - Galaxy Tab 2 7" Android Development

UPDATE: Posted code on github finally:
https://github.com/jmandawg/SamsungIRRemote
I'm interested in creating a better universal remote for our tablets so i did some snooping around and found out how to send commands to the IR port through the irda system service.
Code:
public void onClick2(View view) {
TextView editText = (TextView) findViewById(R.id.textView2);
Object irService = getSystemService("irda");
irService.getClass();
Class irClass = irService.getClass();
Class params[] = new Class[1];
params[0] = String.class;
try {
Method sendIR = irClass.getMethod("write_irsend", params);
for(int i=0;i<2;i++)
sendIR.invoke(irService, "37300,11,67,10,28,10,28,10,27,11,27,11,27,11,67,11,67,11,27,11,68,10,27,11,27,11,27,11,67,11,27,11,1731,11,68,10,28,10,27,11,27,11,27,11,67,11,27,11,27,11,67,11,27,11,67,11,67,11,68,10,27,11,68,10,1653");
editText.setText("Done");
} catch (Exception e) {
e.printStackTrace();
editText.setText("Fail");
}
}
That IR string is for my Sharp TV on/off. I haven't done any IR programming before, so i don't really know what i'm doing, but i had to send the string twice to make it consistently turn the TV on/off.
UPDATE: 6/19/12
Fixed the UI up a bit, and now you can add your own remotes to /mnt/sdcard/remotes directory or Computer\GT-P3113\Tablet\remotes directory from inside windows 7 (you will have to create the directory). I also attached a sample remote file ABC_Sharp_LC_TV.zip unzip file and put in that directory so you can make sure it shows up.
UPDATE: 6/20/12
Fixed the power button on the sharp remote, it was using the old field name "sleepToggle" which is now named "power".
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Look at the ABC_Sharp_LC_TV file for the JSON format, it is important that the file name matches the first JSON field, with spaces instead of underscores.
If you find the codes for your device on remote central and create a file please post them for others.
Here is a list of the button fields for the JSON file:
Code:
"num0"
"num1"
"num2"
"num3"
"num4"
"num5"
"num6"
"num7"
"num8"
"num9"
"windows"
"volUp"
"volDown"
"chanUp"
"chanDown"
"back"
"info"
"up"
"down"
"left"
"right"
"ok"
"play"
"pause"
"stop"
"record"
"forward"
"rewind"
"skipForward"
"skipBack"
"power"
"mute"
"ccToggle"
"red"
"green"
"yellow"
"blue"
"exit"
"guide"
"liveTV"
"recordedTV"
"clear"
"last"

Nice find, I used this website to find IR codes for my old PSP-1000. http://www.remotecentral.com/cgi-bin/codes/

I have been wondering for a couple of weeks now if it is possible to use the IR in our device to control anything besides the TV? I mean with a bit of hacking of course.

Find a way to replace the Logitech Harmony remote that I and many others use and I'm sure you will have an instant hit on your hands

I think this is a great idea, and will be watching this progress.
a little googling found a couple similar projects which may have some good pointers:
http://www.irdroid.com/
http://www.zokama.com/androlirc (merged with http://www.coversal.com/)
the IR port is send/receive right?
another theory i have is that we should be able to have a "learning" remote, where we train it by pointing another remote at it and "capturing" the code transmitted.

Even better if we can get a remote to control the tab volume fast forward, etc.

Works on P3110 model??

Qarl said:
Works on P3110 model??
Click to expand...
Click to collapse
No. http://forum.xda-developers.com/showthread.php?p=26554403
good day.

@op,
maybe you could have a look at here
www.coversal.com
It's a remote control framwork. we could have a kind of lirc conf based plugin that uses the sgt2 blaster.
The guy's would do with some help. Worth a look!

I would give anything to control my wdtv with my gt.

scottx . said:
I would give anything to control my wdtv with my gt.
Click to expand...
Click to collapse
Have you tried:
https://play.google.com/store/apps/details?id=com.osdmod.remote&hl=en

samtran0331 said:
Have you tried:
https://play.google.com/store/apps/details?id=com.osdmod.remote&hl=en
Click to expand...
Click to collapse
That works through WIFI and mine isn't online because I have no remote to get it online with. That's why I need an IR powered remote. I could go buy one from WD I guess but that's too easy.

Any chance you could add codes for an old Sanyo TV? That would be great.

If you can find the pronto codes (the long ones). Most are on remote central.
I will post the file format when i get home tonight.

That's awesome man, thanks.
Is the wdtv you have one of the new ones or an older model? The remote doesnt work for mine. Mines an older model, pn# WD00AVN-00

scottx . said:
That's awesome man, thanks.
Is the wdtv you have one of the new ones or an older model? The remote doesnt work for mine. Mines an older model, pn# WD00AVN-00
Click to expand...
Click to collapse
Mine is a wd live tv plus. It will probably only work with a stock based rom. Do you see any errors in logcat

I have a Sanyo 42" so that would be useful for me too.
I got the remote working on my wdtv. It's because CM9 doesn't support it. (The IR)

What is the model of the Sanyo TV? There is somebody else that asked for it to.

Extremely interesting topic.
Isn't it possible to use LIRC config files?

etique57 said:
Extremely interesting topic.
Isn't it possible to use LIRC config files?
Click to expand...
Click to collapse
Yeah, but we'd have to figure out how to convert the LIRC files to pronto format. Does anyone here know how to do that?

Related

Hardkeys

Is it possible to reconfigure the hardkeys that are set, by default to messaging and Internet Explorer?
Thanks.
Sure. You must read the manual that comes with the phone, but go to
Start > Settings > Personal > Buttons
V
vijay555 said:
Sure. You must read the manual that comes with the phone, but go to
Start > Settings > Personal > Buttons
V
Click to expand...
Click to collapse
Thanks, except (unless I'm either blind or stupid) there is no "personal" entry.
Personal is the Tab along the bottom of the screen. It should already be on personal, but might not be. Click it to be sure, and check your eyes when you can
V
vijay555 said:
Personal is the Tab along the bottom of the screen. It should already be on personal, but might not be. Click it to be sure, and check your eyes when you can
V
Click to expand...
Click to collapse
But this is a smartphone, it doesn't have a tab at the bottom of the screen.
Ahh, my blindness! I apologise profusely.
I'm generally device agnostic, so didn't look at your device name: but I don't use Smartphones.
See if you can find a solution, if not, I'll write you a special app just to make up...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
V
That's a relief, I was starting to think I was going ga-ga.
I'm also interested in a solution, I especially want to reconfigure the two buttons on the side (camera and voice dialing). I wasn't searching profoundly the internet for a solution yet, but also on Modaco and a Swiss board noone knew how solve this problem. So a solution would be highly appreciated
Doesn't AE Button Plus work on your devices?
V
Aha, interesting application, thanks for pointing out to it. Yes, it works, though it's a bit a "too powerful" solution (but better than nothing) - if there was a simple solution that doesn't require an application to run in the background then I'd prefer that...
I imagine there is. I haven't used a Smartphone since Orange E100, way way back. Are you sure there's no easy way?
If I was down and dirty, I'd set one button, export the registry, change it again, and export, and compare the two.
Isolate the registry function, and see if you can extend it.
It's possible certain hardware keys are "off limits", they are on the PocketPC. But I have code that might assist, but if you were using my code, I'd recommend AE Button Plus over it any day
V
One problem is that it doesn't seem to be possible to reconfigure a single one of the buttons via control panel. I saw a solution for the soft keys via registry (HKCU/Software/Microsoft/Home/Keys), but this solution doesn't work for the hard keys (or maybe I'm doing something wrong, happens a lot ). There seems to have been a solution for earlier Smartphones with "SHORT_xxx.lnk"/"LONG_xxx.lnk"-files that should be found in the Windows-directory, but this solution doesn't seem to work on WM5 any more. But I still haven't searched profoundly, so maybe I'll still find something.
is there now any better solution? i tried ae button plus, it runs on my mteor, but i can't map the keys. it says 'taste nicht verändern' / 'key not changeable'. it drives me crazy...
hello, is anything new about changing meaning of HW buttons? thanks
Short_home, Long_Home, Long_send, short_camera, long_camera, Short_record, Long_record, Short_VT, Long_VT, Short_POC, Long_POC
Best regards
But I cant find anything like this in Win directory... (WM6.1)...thanks

Bar Code Manager and API

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
So this isn't really a "Diamond" application, but this is the only forum I post in, and I wanted to share this so maybe other people can find it useful.
While I was checking out of the grocery store tonight, I realized I had left my "preferred savings" card in my car's glove compartment as usual. Naturally, my train of thought derailed into Windows Mobile development and how I could make my life easier. The answer was simple: why can't I save all my card bar codes on my Windows Mobile Device and have the cashier scan the image from my cell phone? It would save wallet space and be really cool to boot!
So obviously, I came home and whipped up a program to do just that. Any cards that you scan with a bar code reader can now easily be imported and stored on your phone!
Click here to read more about the Bar Code Manager and the Bar Code API.
does this work,
I thought due the the polarised nature of LCD screens they would be unreadable by most barcode readers!
I hope so! I'm going to check tomorrow when I head into the office. We have a couple bar code readers laying around.
Good idea! Unfortunately, most bar code readers won't read backlit displays
Glad you boys mentioned this!
Ive beennn doing this ever since my Nokia 7710. I caried my "ID" on my 7710. When ever I was asked fo ID i just pulled put my 7710.
Sooo yes this can be done on any Barcode-ID app.
Boys time to leave that ID home!
They wont even know the Difference with that GORGEous VGA Screen!!!!
Cheers Bradas!!!
This doesnt seem to work with my norwegian bar codes, dunno if we use another standard than you, or not.
2912340005882
157100395
2 983061310951
When entering these i get a NullReferenceException in RefreshBarCode()
WindowsLessControls.StandardBitmap.get_Width()
Weird, the first and the third number worked for me (try redownloading the CAB). The program really only supports 12 digit bar codes though (UPC). I haven't written in support for other formats yet (Code 39, etc).
Koush said:
Weird, the first and the third number worked for me (try redownloading the CAB). The program really only supports 12 digit bar codes though (UPC). I haven't written in support for other formats yet (Code 39, etc).
Click to expand...
Click to collapse
Doesn't seem to want to work with my cooked ROM. I get 'An unexpected error has occurred in WMBarCode.exe. Select Quit and then restart this program.'
And when I restart, I get the screen in the image.
Anyone else confirm this?
A nice next step would be to scan the barcodes with the onboard camera.
jentech said:
Doesn't seem to want to work with my cooked ROM. I get 'An unexpected error has occurred in WMBarCode.exe. Select Quit and then restart this program.'
And when I restart, I get the screen in the image.
Anyone else confirm this?
Click to expand...
Click to collapse
I have the SAME problem as this. Running Tilt 2 with 6.5 stock rom
Does this require anything other than the cab for download at the link?
says "Download the Bar Code Manager and API here"
What is the API? I REALLY want to use this app
I have installed this and typed the number from a store card. Where do I type the name for the card? After typing in the number in the one edit box the barcode, on screen, does not resemble the barcode on the card. If I type any text in the edit box I get "An unexpected error has occured in WMBaeCode.exe" NullReferenceException
Help!
Same stuff happening here on ever rom ive tried. I really want sometihng like this
Can someone post a mirror? The website linked is not working.
Do you think you can provide a slightly better tutorial on how to set up your cards. I can't get any of mine to work, and not all grocery store cards are 12 digits. Any way you can add support for those?
Great program, I've been using it for a long time now and I don't know if there's any development on this, but it would be great for it to support 2D codes too. Thanks

Samsung "Finger mouse" application

How feasible is it to port this to the xperia? Anyone know?
basically, it gives you a useable cursor via the optical joystick
Could you give a link to the original application?
Its not an application you can download, it is a standard app only found in the Omnia because it has an optical joystick similar to X1
yeah unfortunately it's not an application i can find anywhere.
Shame, as its a really cool app - allows you to have a mouse cursor on your windows mobile
the d-pad (side) buttons must be flatten, or the cam must be come higher in future versions of xperia x1.
the pad is to deep in a hole. its not the feeling, it could be. htc/sony/ericsson have to lift up this sensor!
touchpad style...
but tomorrow, i will test, to glue a 1-2 mm transparent pet foil over the touchpad`s cam.
normaly, the pet foil (acryllic glas) will transport the optical informations
i hope to become the touchpad sensor field, exactly to the d-buttons frame`s hight.
so i hope, it will feel as one unity with a plain surface. so it`s easier to slide with the thumb
over the senor.
touchpad style... *G
ehh, okay. Don't destroy your phone
What about the HTC Mouse. The one on the Artemis or Touch Cruise.
DOMin8or said:
but tomorrow, i will test, to glue a 1-2 mm transparent pet foil over the touchpad`s cam.
normaly, the pet foil (acryllic glas) will transport the optical informations
i hope to become the touchpad sensor field, exactly to the d-buttons frame`s hight.
Click to expand...
Click to collapse
Brilliant idea, please keep us informed on what happens with that mod.
Would it not be easier to steal the CAB from an omnia or i780 rom and see if it works? Would give it a go but not sure how.
I've found something that works...
http://www.pocketpcfreeware.com/fr/index.php?soft=758
But it's not much like a real mouse, or how I think it *could* work with the optical joystick. It moves around like it does in Opera mini, I think SE have coded the drivers to make it more useful in scrolling up/down/left/right through menus, rather than to be used like a mouse.
I wonder if someone can create a program that reads the data directly from the sensor rather than through whatever drivers (HID?) are currently being used.
e: Has anyone found a way to boost the optical sensor's sensitivity in the registry? That'd help a little. It takes ages to move around the screen atm.
e II: It's certainly not perfect; the transparency of the pointer causes problems with menus. also I noticed that the pointer is taking commands from both the optical sensor and the directional buttons around it. I wonder if SE really have made the drivers so that the optical joystick only emulates the directional buttons.
I've got an i780 and the FingerMouse on it was truly awesome - allowing for genuine one-handed use and setting it apart from the rest of the WM crowd. I've now "upgraded" to the X1 and while a lot of the problems have been fixed by Jack's Rom, getting the optical mouse working as a cursor will be what stops going back to the i780!
I've copied the attached dll and fingermouse.exe app if anyone can make any use of it. I'm afraid I have no developer skills whatsoever, but if someone can talk me through anything else that's required off my i780, I'll happily oblige There's also the full i780 rom kitchen here:
http://forum.xda-developers.com/showthread.php?t=409258
Telster said:
I've got an i780 and the FingerMouse on it was truly awesome - allowing for genuine one-handed use and setting it apart from the rest of the WM crowd. I've now "upgraded" to the X1 and while a lot of the problems have been fixed by Jack's Rom, getting the optical mouse working as a cursor will be what stops going back to the i780!
I've copied the attached dll and fingermouse.exe app if anyone can make any use of it. I'm afraid I have no developer skills whatsoever, but if someone can talk me through anything else that's required off my i780, I'll happily oblige There's also the full i780 rom kitchen here:
http://forum.xda-developers.com/showthread.php?t=409258
Click to expand...
Click to collapse
Thank you so much, been waiting for someone to post this. I'll happily send a donation to anyone who gets this working.
I'd love to get this working properly too, it'd be especially useful for some games... COD2 with real "mouselook" on a phone would be fantastic.
btw this is the real fingermouse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I will donate 50€ for the one who do this that its working like on my Omnia.....
this is a promise!!!!!!
would anyone use a laptop touchpad only like arrow keys instead of a mouse pointer??? NO!!!!
Greetz
SquidgyB said:
btw this is the real fingermouse
Click to expand...
Click to collapse
HAHA, very funny

[Mod] Logitech app for Harmony Smart/Ultimate remotes

Harmony remote app on the Gear (for Logitech Harmony Smart and Ultimate remote)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Modified the Harmony app a bit to use it on the Gear. It's just a temporary quick and dirty hack to allow the remote app to bypass the wifi detection when it starts up. Hope to work on it a bit more in the future, but for now it will do for others to experiment with it
A working bluetooth tethering connection is required!
1. To connect launch the app. The following screen will be displayed
hit the question mark in the upper right corner.
2. The following screen will appear
Select Advanced Scan
3. This will get you to the advanced scan screen. Here you should select Enter IP Address Manually and enter the IP address of your Harmony Hub. (To find the IP address look under Info in the general menu of the app on your phone or check your router page)
Again, this is just a experimental quick and dirty mod. Primarily for experimenting with such a use case. I encourage others to decompile the app and do some additional smali editing if you want to make it work the way you want. (Because of time constraints I can't promise that I will do some extra work on this)
I already contacted Logitech and asked them if they want to make the app work with bluetooth tethering scenarios. Let's hope they will update the app soon. Because really, with the Logitech hub you can control your complete Home Theater System with your watch. (Yep... no more searching for the remote
This is a mod of https://play.google.com/store/apps/details?id=com.logitech.harmonyhub
appelflap said:
Harmony remote app on the Gear (for Logitech Harmony Smart and Ultimate remote)
Modified the Harmony app a bit to use it on the Gear. It's just a temporary quick and dirty hack to allow the remote app to bypass the wifi detection when it starts up. Hope to work on it a bit more in the future, but for now it will do for others to experiment with it
A working bluetooth tethering connection is required!
1. To connect launch the app. The following screen will be displayed
hit the question mark in the upper right corner.
2. The following screen will appear
Select Advanced Scan
3. This will get you to the advanced scan screen. Here you should select Enter IP Address Manually and enter the IP address of your Harmony Hub. (To find the IP address look under Info in the general menu of the app on your phone or check your router page)
Again, this is just a experimental quick and dirty mod. Primarily for experimenting with such a use case. I encourage others to decompile the app and do some additional smali editing if you want to make it work the way you want. (Because of time constraints I can't promise that I will do some extra work on this)
I already contacted Logitech and asked them if they want to make the app work with bluetooth tethering scenarios. Let's hope they will update the app soon. Because really, with the Logitech hub you can control your complete Home Theater System with your watch. (Yep... no more searching for the remote
This is a mod of https://play.google.com/store/apps/details?id=com.logitech.harmonyhub
Click to expand...
Click to collapse
What would it take to get the Harmony smart control to work with something like Tasker? I'd kill to be able to have my home theater system, lets say, turn on when I walk in the door.
Sent from my Nexus 10 using XDA Free mobile app
This is hilarious, Nice share.. How did I just notice this tho ?
I may have to give it a try !
Does this work with Tizen?
PERFECT!...but...
This would be AMAZING on the Tizen Gear but it seems it is only for Android. Hopefully when they port Android Wear to the Gear it will work. Keep up the good work Dev. Thanks.
Any plans on updating? Currently force closes on Android Wear Lollipop

vertical display

Is there a way to force the chromecast to display what is on the screen as rotated. I have a tv that is turned vertically and I want my vertical devices display to take up the whole screen.
If you stretched the image everyone would look like aliens...what I'm saying is it would massively distort the image.
Well thats good to know?!? So bavk to the question at hand... can the mirroring be forced to be displayed in a rotated state? Heres an example of my tvs orientation...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
n1gh7mar3 said:
Well thats good to know?!? So bavk to the question at hand... can the mirroring be forced to be displayed in a rotated state? Heres an example of my tvs orientation...
Click to expand...
Click to collapse
No because the TV would have to do the rotating....
No matter how you turn the TV the TV still considers the TOP to be the TOP!
CCast has no ability to change that or re rotate its output on it's own....
The only way I can think of to do what you propose would be the use of an expensive device that can take any input and rotate it before it gets into the TV.
And those would cost in the thousands.
Do you have an example or a link to such a device?
n1gh7mar3 said:
Do you have an example or a link to such a device?
Click to expand...
Click to collapse
http://www.flexiblepicturesystems.com/images/FPS_OS-200_datasheet.pdf
I work in digital signage and we have 1,000s of screens which work like this. And software and hardware which deals with it. Its all commercial grade though, which the Chromecast isn't.
I'm sure technically the CC *could* do it, but I don't think google would spend time enabling it to be honest. So without rewriting a large chunk of the firmware, then no you can't.
generationgav said:
I work in digital signage and we have 1,000s of screens which work like this. And software and hardware which deals with it. Its all commercial grade though, which the Chromecast isn't.
I'm sure technically the CC *could* do it, but I don't think google would spend time enabling it to be honest. So without rewriting a large chunk of the firmware, then no you can't.
Click to expand...
Click to collapse
You could perhaps code a custom app and CCast Receiver that could allow you to rotate video to the proper orientation.
The Difficulty would be in how you would go about doing that...
Two Methods I can think of are:
1 - rotate the video during transcode before sending it to the receiver app. (key issue will be power of a mobile unit to Transcode the Video)
2 - Create a receiver app that can rotate it's input on the fly. (probably difficult to pull off due to sandbox and memory limitations of the CCast)
The device I linked to above might very well work with a CCast since it has an HDMI input. But you may have to trick the device into multi Monitor upscaling mode to get the right effect.
I don't have any experience with the quicks or cheats on that device so be sure to give it a test run to ensure it meets your needs before you buy!

Categories

Resources