My First Android App - Android General

I am working on building my first Android app, this app will allow me to use my phone with a USB device that will let my phone work as a remote for my TV.
I have already build my GUI layout and database, and they seem to be running good on my Note 2.
I am now stuck on trying to figure out how to connect this device to my phone.
The device I have is the USB IR Toy 2, here is the link
dangerousprototypes.com/docs/USB_Infrared_Toy
Any help is welcome, I am using the Android SDK to build this app.
Once I am done I will post my code here for you all to use as you wish.

no responses?
Is this not possible?

ZIGMA51 said:
I am working on building my first Android app, this app will allow me to use my phone with a USB device that will let my phone work as a remote for my TV.
I have already build my GUI layout and database, and they seem to be running good on my Note 2.
I am now stuck on trying to figure out how to connect this device to my phone.
The device I have is the USB IR Toy 2, here is the link
dangerousprototypes.com/docs/USB_Infrared_Toy
Any help is welcome, I am using the Android SDK to build this app.
Once I am done I will post my code here for you all to use as you wish.
Click to expand...
Click to collapse
Usb otg I assume to be to the solution.
Sent from my LG-LS970

desert54 said:
Usb otg I assume to be to the solution.
Sent from my LG-LS970
Click to expand...
Click to collapse
Usb otg?

ZIGMA51 said:
Usb otg?
Click to expand...
Click to collapse
Its a function that allows you to connect a usb device to a phone.
Sent from my LG-LS970

ok, I will need to look in to USB on the go more.
Is there any example code I can review, that might help?

ZIGMA51 said:
ok, I will need to look in to USB on the go more.
Is there any example code I can review, that might help?
Click to expand...
Click to collapse
What I know is that usb otg can only be done on certain chipsets, as for code source, I have no idea.
Sent from my LG-LS970
---------- Post added at 08:09 AM ---------- Previous post was at 07:59 AM ----------
Assuming that the note 2 supports USB Otg stock, You could just simply purchase a usb otg cable for it and work from there.

OK I got my device to connect to my phone, I even made it where when I connect my device it launches my app, but I am having issues with getting my phone to talk to my serial USB device.
Anyone have a idea how to do this?

Related

usb mode

usb mode keeps starting and shutting off very rapidly. i cant transfer files. what could cause this. and its a brand new phone by the way
roughneckboren said:
usb mode keeps starting and shutting off very rapidly. i cant transfer files. what could cause this. and its a brand new phone by the way
Click to expand...
Click to collapse
Are you talking about trying to transfer files to/from a USB flash drive? If so, I've encountered the same. I spoke to Samsung tech support and they confirmed that the I727 Skyrocket is not OTG USB Host Enabled... while the GS2 I777 stock kernel is Host enabled. That said, there was one member on this forum who states their stock Skyrocket is OTG USB Host enabled (allowing him to transfer files to/from a USB flash drive). We need a developer to advise if/when a kernel (preferable stock + otg USB host enabled) can be developed for our i727 Skyrocket.
If you talking about transferring files to a computer, you should have that capability. Make sure USB Debugging is checked on phone and you have the correct drivers installed on your PC.
I'm talking about transferring files(pictures,movies,etc..) I have USB debugging enabled and I downloaded the drivers presented on the forums here. It just connects then disconnects repeatedly. I'm pretty sure its a driver issue but I'm using the ones from xda. I'm not sure where to go from here. Any help would be appreciated
Sent from my Xoom using xda premium
roughneckboren said:
I'm talking about transferring files(pictures,movies,etc..) I have USB debugging enabled and I downloaded the drivers presented on the forums here. It just connects then disconnects repeatedly. I'm pretty sure its a driver issue but I'm using the ones from xda. I'm not sure where to go from here. Any help would be appreciated
Sent from my Xoom using xda premium
Click to expand...
Click to collapse
You're not supposed to use USB Debugging for transferring files like that.
Just turn off debugging.
Then when you plug in the USB cable, the notifications bar should let you know it's connected. So click on that notification about the USB, then click the option to "connect".
It's kind of redundant if you ask me, but it's how it works.
I know it don't have to be ticked to transfer files. It does it whether its on or off. I'm just trying to get it to stay locked in so my computer recognizes it
Sent from my Xoom using xda premium
And it also makes it quite frustrating to flash or anything via computer
Sent from my Xoom using xda premium
Well I'm not sure then. Here's a few things to try:
1) Different USB port on your computer. If you're using a rear port, then try a front port. Sometimes they use different chipsets.
2) Different USB cable. They can get flakey sometimes.
3) Go into 3E Recovery and clear cache. Could be a setting that got whacked out.
---------- Post added at 04:06 AM ---------- Previous post was at 04:06 AM ----------
roughneckboren said:
I know it doesn't have to be ticked to transfer files.
Click to expand...
Click to collapse
Sorry, pet peeve of mine.
Do you mean davlik cache?
Sent from my Xoom using xda premium

[Q] Wireless Broadband USB

Is is even possible to plug in a wireless broadband card/USB into a WiFi only Note 10.1?
No I does not detect I tried it once but did not work I think the drivers of the usb are not pre installed you can try it no harm in doing that to check whether it is detected
I saw an app that allows you to use it. I'll look for it.
Maybe this
https://play.google.com/store/apps/details?id=de.draisberghof.pppwidget
apristel said:
I saw an app that allows you to use it. I'll look for it.
Maybe this
https://play.google.com/store/apps/details?id=de.draisberghof.pppwidget
Click to expand...
Click to collapse
Yes should work but you need to be rooted as it needs to install kernel files as per play page I guess those are the usb drivers
Thanks for the tips and information.
Skyroam Gmate+
iRock48 said:
Is is even possible to plug in a wireless broadband card/USB into a WiFi only Note 10.1?
Click to expand...
Click to collapse
try Skyroam Gmate+, maybe this will help you. I can't post a link, but you can try skyroam . com. Geeks . com has it for 55 dollars.

[Q] How do you root without a computer?

I have a Le Pan II with ICS, and the inside of the USB port broke, and when I connect it to a computer it won't do anything. I tried using framaroot, but I get a message saying "Operation failed." I really need to root it because everything I want to do (increase charging voltage, overclock, move ALL apps to SD, change font, CLEO for GTA: SA and many other things) require root.
sonic64 said:
I have a Le Pan II with ICS, and the inside of the USB port broke, and when I connect it to a computer it won't do anything. I tried using framaroot, but I get a message saying "Operation failed." I really need to root it because everything I want to do (increase charging voltage, overclock, move ALL apps to SD, change font, CLEO for GTA: SA and many other things) require root.
Click to expand...
Click to collapse
Aww, I was going to say Framaroot.
What version of ics?
---------- Post added at 12:02 PM ---------- Previous post was at 11:51 AM ----------
With a wireless adb app and the pc root files you could root it.
Otherwise, fix that port.
Lgrootnoob said:
Aww, I was going to say Framaroot.
What version of ics?
---------- Post added at 12:02 PM ---------- Previous post was at 11:51 AM ----------
With a wireless adb app and the pc root files you could root it.
Otherwise, fix that port.
Click to expand...
Click to collapse
I have 4.0.4.
You can probably work it without a computer near by (root with Framaroot, download ROM to device,...) but to be on the safe side, you should have a computer around with ODIN (or something like it) installed on it so you could recover from a bad rom flashing.
sonic64 said:
I have 4.0.4.
Click to expand...
Click to collapse
hi,
use some wireless application from play store to connect with PC or repair it. Don't forget to take backup of your existing ROM...
Use this thread to root your ICS
http://www.xda-developers.com/android/root-many-ics-and-jelly-bean-android-devices/
The method is a script written by XDA Recognized Developer Bin4ry
-rkk
rkk253755 said:
hi,
use some wireless application from play store to connect with PC or repair it. Don't forget to take backup of your existing ROM...
Use this thread to root your ICS
http://www.xda-developers.com/android/root-many-ics-and-jelly-bean-android-devices/
The method is a script written by XDA Recognized Developer Bin4ry
-rkk
Click to expand...
Click to collapse
Looks right.
But he needs to adb connect the server before he starts the bat file.
The only way I can connect to my computer is with Wi-Fi or Bluetooth, I only have on port on my tablet but it's broken. There has to be someway to root without a USB cable. Either without a computer or over Wi-Fi or Bluetooth, but the adb has to run before they are even activated, which I read on a defferent website. Or mabye something similar to framaroot, I did find something else, but that was a few months ago and I couldn't find one download link for it.

[Q] Enable OTG/root on mysterious tablet

Hello,
First of all I want to thank you for all the resources you share, very helpful!
Well.. I just bought this tablet.. Fourel [email protected] 7002. If any of you know it please don't blame me. On the box it says it is OTG-ready and I can use any USB device but actually it doesn't look like. I need to connect my "tablet" (quotes are mandatory) to an external device and use it thru an android app, which I already have. The app launches "smoothly" but it says no device connected. I am pretty sure the USB cable is compatible cause it's the official app's cable.
So, do I need to root my device and enable OTG which may be hardware-ready but needs to be unlocked? Any other idea? I tried Framaroot but it didn't work.
Thanks!!
PS I'm not very expert of rooting, modding and stuff on Android devices, if you could please describe step-by-step procedures that'd be awesome!!
joeg985 said:
Hello,
First of all I want to thank you for all the resources you share, very helpful!
Well.. I just bought this tablet.. Fourel [email protected] 7002. If any of you know it please don't blame me. On the box it says it is OTG-ready and I can use any USB device but actually it doesn't look like. I need to connect my "tablet" (quotes are mandatory) to an external device and use it thru an android app, which I already have. The app launches "smoothly" but it says no device connected. I am pretty sure the USB cable is compatible cause it's the official app's cable.
So, do I need to root my device and enable OTG which may be hardware-ready but needs to be unlocked? Any other idea? I tried Framaroot but it didn't work.
Thanks!!
PS I'm not very expert of rooting, modding and stuff on Android devices, if you could please describe step-by-step procedures that'd be awesome!!
Click to expand...
Click to collapse
I've never heard of something like this... like you have to unlock it.. i would say try another usb maybe??

Otg funtionality....

So i got a bunch of on the go cables. And wanted to see what the stylus could do.
So far ive hooked a 160 gb otg hard drive. Works decently.
2. Ps3 control for gaming.
3 flash drives. Of coarse this works.
4. Usb ob2 interface for scanning automobile ecus. Works better than g4 if i might add.
5. A old logitech wingman joystick. Works on some flight simulators.
I also ordered a while back a fastboot cable for my kindle. When i plug in on ms631 from power off no commands needed boots straight to fastboot mode
Im gonna make a pair of vr goggles prob this weekend and see if this screens good enough for vr. Did it on my g3 and g4. And it was killer
How did you get you're OTG to function? I plug in a 8gb flash drive to mines and it doesn't work for me I'm using the T-Mobile version MM.
Nothing its reading natively. Try stick mount.
Ive been reading about loads of people haveing problems with it im looking for a fix.
But the phone most def supports otg verriefied from more than one site
vansthatcrash said:
How did you get you're OTG to function? I plug in a 8gb flash drive to mines and it doesn't work for me I'm using the T-Mobile version MM.
Click to expand...
Click to collapse
Maybe the metro one dont have otg
Has anyone figured out how to get OTG to work on the T-mobile LG G Stylo with Marshmallow? Mine has the latest stock 20c software (H63120c). I use OTG with my FLIR One Android, my SDRPlay, and my RTL-SDR stick, and it would be sad if I have to still use my old Xperia Z for all that.
ecarlson said:
Has anyone figured out how to get OTG to work on the T-mobile LG G Stylo with Marshmallow? Mine has the latest stock 20c software (H63120c). I use OTG with my FLIR One Android, my SDRPlay, and my RTL-SDR stick, and it would be sad if I have to still use my old Xperia Z for all that.
Click to expand...
Click to collapse
This page seems to say that adding the file android.hardware.usb.host.xml to /system/etc/permissions will enable USB host mode. Has anyone tried adding this file to a T-Mobile or Metro PCS Marshmallow phone? I haven't rooted my T-mobile Marshmallow phone yet, but I will if I root access will allow me to enable OTG.
http://rfexplorer.com/usb-host-mode/
Update: Has anyone with T-mobile or MetroPCS Marshmallow and root tried this app, or manually making the changes that this app applies, to see if it will get OTG to work: https://play.google.com/store/apps/details?id=org.tauruslabs.usbhostcheck
ecarlson said:
This page seems to say that adding the file android.hardware.usb.host.xml to /system/etc/permissions will enable USB host mode. Has anyone tried adding this file to a T-Mobile or Metro PCS Marshmallow phone? I haven't rooted my T-mobile Marshmallow phone yet, but I will if I root access will allow me to enable OTG.
http://rfexplorer.com/usb-host-mode/
Update: Has anyone with T-mobile or MetroPCS Marshmallow and root tried this app, or manually making the changes that this app applies, to see if it will get OTG to work: https://play.google.com/store/apps/details?id=org.tauruslabs.usbhostcheck
Click to expand...
Click to collapse
So far its a no go. Placed the xml file...nothing. then edited build.prop to remove a # from a line...nothing....inserted <feature name=”android.hardware.usb.host” /> into permissions xml.....nothing. still working on it. Some say it works natively, others say they cant get it to work at all
Sent from my LG-H631
CollisionFactor said:
So far its a no go. Placed the xml file...nothing. then edited build.prop to remove a # from a line...nothing....inserted <feature name=”android.hardware.usb.host” /> into permissions xml.....nothing. still working on it. Some say it works natively, others say they cant get it to work at all
Click to expand...
Click to collapse
Thanks. If you do get it working, I would be very interested to hear about it.
ecarlson said:
Thanks. If you do get it working, I would be very interested to hear about it.
Click to expand...
Click to collapse
So i was able to get OTG support enabled on the device but the phone doesnt send enough power to the micro usb so you would need an otg y cable to add external power supply like a portable battery
Sent from my LG-H631
CollisionFactor said:
So i was able to get OTG support enabled on the device but the phone doesnt send enough power to the micro usb so you would need an otg y cable to add external power supply like a portable battery
Sent from my LG-H631
Click to expand...
Click to collapse
Cool. I have a Y cable. How did you get it working?
ecarlson said:
Cool. I have a Y cable. How did you get it working?
Click to expand...
Click to collapse
Well i was able to enable the host api by following the url you shared...after you edit those files connect your otg y cable, flash drive and external power to your phone and see what it does...im still trying to get mine to actually mount the drive...let me know if you can figure anything out
Sent from my LG-H631
CollisionFactor said:
Well i was able to enable the host api by following the url you shared...after you edit those files connect your otg y cable, flash drive and external power to your phone and see what it does...im still trying to get mine to actually mount the drive...let me know if you can figure anything out
Click to expand...
Click to collapse
I haven't rooted mine yet, but I might now that it might be possible to enable OTG.
I gave up, and got a used "mint" LG V20 for cheap, which has OTG support built in. My LG G Stylo will be used by someone who has no idea what OTG is.
Besides "usb.host" to your permissions xml's, setprop "sys.usb.configfs=1" & "sys.usb.config=*" in dev options must be set right. Init.qcom.usb.rc told me what I needed to get mtp & adb working together.
Sent from my LG-H631 using Tapatalk

Categories

Resources