Android bluetooth game development - Java for Android App Development

Hello,
I started developing games for android a month ago, now Im wondering am I able to create a game such as super smash bros. for android that uses Bluetooth to communicate and play? The game will be mainly for tablet but will be adapted toward Mobile Phones.
Regards,
Tripplemin

tripplemin said:
Hello,
I started developing games for android a month ago, now Im wondering am I able to create a game such as super smash bros. for android that uses Bluetooth to communicate and play? The game will be mainly for tablet but will be adapted toward Mobile Phones.
Regards,
Tripplemin
Click to expand...
Click to collapse
Yes you can - Android supports standard Bluetooth API for peer-to-peer communication, typically using sockets over bluetooth l2cap protocol. This means you could also communicate with non-Android devices but not iOS - it does not support these API's.
Implementation is not too difficult, particularly if you are familiar with doing sockets in Java.
On the other hand, you will probably encounter wonkiness. One issue is various implementation bugs, which are different on the different manufacturers because they implement their own Bluetooth drivers and stacks.
Also, the Bluetooth protocol supports a master-slave architecture. A master can coordinate communication with up to 7 slaves, but operates poorly/inefficiently if it is simultaneously operating as a slave to another master (or the master of 2 piconets at the same time).
In practical terms this means that it will work best if none of the devices playing the game are simultaneously using Bluetooth for e.g. tethering, controller, headset, google glasses....
Also, what happens if the master of the piconet (probably the person who initiated the first connection) stop laying and leaves... how quickly and with what prodding from your app will a new piconet form?
Looking at what I have written I realize I am probably putting you off the idea, and I'm not sure if that is fair - while I've done Bluetooth on Android and have done all the weird piconet stuff on raw Linux, I have not personally encountered the issues I'm describing on Android (just Linux). So I'm partially conjecturing and would be happy if someone else who had tried these permutations on Android wanted to correct me...

QUESTION?
Thank you so much for yur reply and I would like to contact you in the future so would you please give me your email address?
Regards,
tripplemin

tripplemin said:
Thank you so much for yur reply and I would like to contact you in the future so would you please give me your email address?
Regards,
tripplemin
Click to expand...
Click to collapse
Ask in the forum. This is what this is made for.
Everyone knows different things. You will get the best help here because there are many people seeing your question here.

THAN YOU!
Oh ok....and I love XDA, it brings developers to help each other..
Regards,
tripplemin

Related

[REQ] XLink Kai WM Edition {$10} BOUNTY

Hello Everyone!, I would like to start off this topic with a Request to all developers to give birth to a XLink Kai WM Application! Naturally with something as complicated as a tunneling app to be ported over to a Mobile handset, i would like to begin a Bounty and Request for a WM Xlink Kai.
It would be absolutely amazing if we could get some official Xlink Developers in on this as it would give us a lot of in site.
=={About XLink Kai}== *As quoted from website*
"XLink Kai is a program that you run on your PC or Macintosh that allows you to play system-link / LAN-enabled games for your XBox, Playstation 2, Gamecube and PSP.
The software is referred to as what is known as a 'tunnelling' application. There are various other single-console tunnelling applications available, but XLink remains the only one to support all 3 major consoles..."
~~~~~~~~~~~~~~~~~~~
=={Why Kai on WM?}==
I Don't understand why is hasn't been done, but i still spectacle at the day when i can pair my DS or PSP to my phone as use that as my proxy to other players, instead of my Laptop in a long car ride. Which id still have to pair with the phone to gain internet access. Besides what if i'm in a situation when i dont have my laptop with me, but just my PSP/DS and Phone, and would like to go for a hunt in Monster hunters, and have someone team with me to get that blasted Kirin.
~~~~~~~~~~~~~~~~~~~
=={How This Well Be Done}==
I do not have the slightest Clue, i shall shed some light, when some Devs/Programmers can in this thread for everyone to see
~~~~~~~~~~~~~~~~~~~
=={Programmers-R/Developers-O/Graphic Desigers-Pur}==
Non Known ATM
~~~~~~~~~~~~~~~~~~~~~~
=={App Design Ideas}==
TBD
~~~~~~~~~~~~~~~~~~~
(Red-Pledge Orange-Pending Pledge Green-Paid Pledge)
=={BOUNTY CHECKLIST}==
Ranmsaotome510- $10
Ideas are welcome, in fact encouraged.
For starters, would a sourceforge group be good for us? i have no clue, or what about that other site i believe it was Google that had a similar site like sourceforge for developers? Google Code?
So let the shows begin!
Bumping to see if i can atleast get anyone a "oh yes im interested in seeing this kick off as well"
P.S- Anyone interested in doing a mock up (Graphic)
xbox remote for the ppc a while back...kinda stalled out but might be a place to start definately connected and allowed remote control...on the original xbox- fantastic machine when running xbmc...maybe called xbmc remote.
somewhat irrelavent to what xlink is, its not a remote app, its an app that tunnels traffic (mainly LAN, or Ad-Hoc) over the Internet. to allow ad-hoc games to play over the internet.

Mobipad - wiimote control for mobile

can we get this on hero/g2 ?
http://www.youtube.com/watch?v=FMlDEThW34w
basically u can control your phone with the nokia wiimote via bluetooth. it will be good for playing games and emu
any dev out there?
ermacwins said:
can we get this on hero/g2 ?
http://www.youtube.com/watch?v=FMlDEThW34w
basically u can control your phone with the nokia wiimote via bluetooth. it will be good for playing games and emu
any dev out there?
Click to expand...
Click to collapse
The devs for that only thought of A2DP... they didn't think of implementing the rest of the BT profiles... :-(
Donut? Eclaire? Or maybe Flan? I bet my next turd on some more letters in the alphabet for that to happen...
I mean... BT is an open standard ffs... but no... Google have a bunch of trained monkeys eating bananans all day...
in english please lol
ermacwins said:
in english please lol
Click to expand...
Click to collapse
I'd be kicked and banned from this forum if I gave you that in plain English...
The way to "talk" to devices that are equiped with Bluetooth radios is open source, ie "everyone" can use that information for their own purposes. In this case there already exists some well defined Bluetooth "profiles" (protocols) which defines how sound should be communicated between devices (the A2DP profile takes care of this). Google has only implemented support for the A2DP profile in Android 1.5 (aka "Cupcake"). They haven't put in support for anything else.
But third parties (guys/organisations like Cyanogen, JesusFreak(sp) and MoDaCo) have found a way to get the kernel in Android to use third party BT profiles. But this involes "rooting" the device. Not everyone is prepared to do that (myself included).
This is why I (and many more) are badmouthing Google. I didn't say I hate Google. But I will say that they should implement a full BT stack ASAP.
so mobipad is possible but needs root?

PS3 Control on Android Devices?

So I was running through the source code for the Behold 2 Kernel.
I found: kernel\drivers\ps3
with files inside to control/manage the PS3 system. (Turn on, off, etc)
Is there a way to activate those drivers and actually connect your phone through bluetooth to the PS3 and control it? On, Off and move around in the menu?
That would be pretty interesting... specially if you can get Remote Play to work on an android device!
Wow, if this is true then i'll definitely get an android phone to play with!
I guess not many people with ps3's around here. I'd love to have some sort of interaction with my ps3.
I'd really like this functionality too.
mrandroid said:
So I was running through the source code for the Behold 2 Kernel.
I found: kernel\drivers\ps3
with files inside to control/manage the PS3 system. (Turn on, off, etc)
Is there a way to activate those drivers and actually connect your phone through bluetooth to the PS3 and control it? On, Off and move around in the menu?
That would be pretty interesting... specially if you can get Remote Play to work on an android device!
Click to expand...
Click to collapse
I think that the catch with android and bluetooth keyboard/mouse support was the lack of the HID profile. If the behold actually has that built in custom it would unlock a lot more than just ps3 support, but I'd love that too.
They have managed to port the Remote Play features to MS Windows so it must be possible to port it to a Linux based OS (i.e.. Android)
Tawm said:
They have managed to port the Remote Play features to MS Windows so it must be possible to port it to a Linux based OS (i.e.. Android)
Click to expand...
Click to collapse
There has to be a way. The Kernel source codes come with PS3 Modules built by sony. The PS3 itself runs on linux (original ps3s even support installing linux operating systems)
I believe someone would need to activate those modules and rebuild a kernel, then someone needs to build an APP to take advantage of those features.
For sure we can connect through bluetooth and turn on/off the system and navigate the menu... That much the modules tell you. But again we need an APP for it too.
Thats cool if you can controller the ps3 i would buy an app for that
me too!
mistake. please delete
I'm eagerly waiting for this functionality to reach the Android platform too. Perhaps, now when SonyEricsson is focusing on the Android platform we'll see this kind of functionality implemented into a Android based device soon, and perhaps then ported to other devices.
Best case scenario would in my eyes of course be that the Android platform itself would support necessary HID profiles. I know that Android 2.X supports more Bluetooth stacks than previous versions, but that doesn't help I suppose..?
This company is making an app to use external bluetooth keyboards as an input device for Android. Maybe we can see if they could also make one for Android to control other devices such as the PS3. I just posted on their forum to ask if they could do this (if even possible):
http://www.teksoftco.com/forum/viewtopic.php?p=5247#5247
I for one can't wait for the day that I can use my Android phone to input text on my PS3.
EDIT: they already replied. that was fast! ...so it's do-able but need "community interest" before investing. [hint, hint]
jasnmb said:
..so it's do-able but need "community interest" before investing.
Click to expand...
Click to collapse
*shows interest*
xPatriicK said:
*shows interest*
Click to expand...
Click to collapse
we all should post to that forum to show as much interest as possible.
yeah, this would be great, if not by blutooth, even if we had to plug it in usb I would be fine with that.
*shows interest*
bluemaemo should work as the N900 is running on linux too:
http://www.valeriovalerio.org/?page_id=174
Turn your android mobile device into a bluetooth keyboard huh... *shows money*
maybe we should start a poll and link them to it... id pay to use my G1 as a bluetooth keyboard & touchpad on my ps3
Is there a way to do the contrary? I mean, control your phone with a PS3 controller, for games?
mrandroid said:
So I was running through the source code for the Behold 2 Kernel.
I found: kernel\drivers\ps3
with files inside to control/manage the PS3 system. (Turn on, off, etc)
Is there a way to activate those drivers and actually connect your phone through bluetooth to the PS3 and control it? On, Off and move around in the menu?
That would be pretty interesting... specially if you can get Remote Play to work on an android device!
Click to expand...
Click to collapse
I do/did some research and worked on a Linux OS based on some code from the PS3-Linux project, a collaboration between Sony and the open-source community to help port Linux to the Cell Broadband Engine architecture and the Playstation 3. If you look, on the XrossMediaBar of old "fat" PS3's, under Settings > System Settings, there's an option for "Install Other OS" and "Select Default System". It was dropped/suspended indefinitely on development of the slim PS3's, to save time and money (since the slim PS3 re-does some central things in the I/O architecture, requiring a new hypervisor to be programmed.)
I'm actually considering porting the Android OS to the Playstation 3 sometime in the future, as a media-center, games and apps environment alternative to the PS3's OS. It will likely be based on my experience with the Electricsheep android firmware, another one of my projects.
Android, though built with touch in mind, works fine with a directional control and menu keys, not unlike the PS3 controller. A virtual mouse built on the right analog stick won't hurt either. Sixaxis provides the accelerometer, too. Not sure how it'll fare at 1080p resolution, but I'll wait 'till I get it ported to test that.
What I'm guessing, is that either someone else was considering the same thing, and pushed the drivers for the PS3's hypervisor and I/O from the mainline kernel into Android, or just left that in there and forgot to remove it.
But no, I don't believe said drivers are actually for remote-controlling the PS3 either by Bluetooth or Remote Play. They're likely not even compiled on builds for mobile phones (unless someone makes a Cell-phone.. hehe... eh.. *ahem*)
Anyway, if someone else already said this, I'm sorry, but I didn't read the entire thread. It's kinda long.
Also:
blackplatypus said:
bluemaemo should work as the N900 is running on linux too:
http://www.valeriovalerio.org/?page_id=174
Click to expand...
Click to collapse
Maemo could and probably would run on the G1: the basis for my Utopia Pocket Linux project.

[Q] [Android Core] - Handling multiple data-based applications

Hi All,
I want to know how Android handles multiple applications which are data-based simultaneously. For example, one of the Android Applications might be an IM, one e-mail application, one SNS client(like Facebook client, Twitter client), but all of them can run simultaneously in Android without any hiccups. May I know how this situation is handled in Android stack?
If yes, then since Android is open-source, any pointers to suitable portion of the platform code which handles this would be perfect.
Please excuse me if I was not clear enough on my question and let me know. I'll try to explain it yet once again in a better fashion.
Thanks,
Pritam.
I really don't understand your question. Are you asking about how the OS multitasks? How the TCP/IP stack handles multiple connections? Something else?
Yes, you are right. I believe the TCP/IP stack implementation is part of the Android Stack Code. I want to know with so many Applications using data services simultaneously, how does Android keep track of the sessions and everything? A suitable pointer/reference to Android Code would be simply great.
Thanks,
Pritam.
The android is based on linux and this is all part of the core kernel networking drivers. TCP/IP on linux has been around for ever. Somehow, I think we're talking past each other.

Connect Android to Enterprise Java Bean

Hi!
Im sorry if this is a dumb question but I googled some stuff about it and never found a straight YES/NO answer.
Im a student in my final year and as a semestral project I have an electronic voting system built on Java Enterprise technology with enterprise java beans (EJBs) running on Glassfish.
For my final work id like to create an app for android that could communicate with those beans on a Glassfish server and thus a people could vote by a cell phone.
My question is Is this even possible? Over the past three days ive been googling stuff concerning this matter but nothing really helped. Id really appreciate a straightforward answer because my time for choosing a final project is almost up and I dont want to end up doing something that is impossible.
Don't take it bad, but it looks like you are a student who doesn't even know what he's working with. Not that it surprises me, but I'm willing to help you.
Answer these straight questions.
1. What is an EJB?
2. Who "runs" an EJB?
3. Where does an EJB "live"?
If and when you answer these three questions you'll know what is needed for a project where "people could vote with a cellphone".
What I can tell you in the most straightforward way is that it is possible for you to have people using their android phones to vote with your Glassfish server.
Android <-> Glassfish
I am looking for the same thing - to write Android apps that communicate with session beans on an app server (i.e. Glassfish). Since I will own both ends of the app, I am looking for a simple approach (e.g. RMI) as opposed to a lot of unnecessary bru-ha-ha (e.g. why turn Java objects into SOAP, just so we can turn them back into the same Java object ... not that Android really supports SOAP).
It looks like Google, for some reason, crippled the Android's ability to communicate. About the only built-in mechanisms I've found are REST (and I don't like REST) or writing my own protocol and using servlets.
Surely, by now, someone has come up with a simple, concise, mechanism for addressing this issue ... I just can't find it.

Categories

Resources