[Q] Mindstorms Intergration - Java for Android App Development

Hello all,
During my studies I am designing a project involving a LEGO Mindstorms "Robot" and an accompanying Android app. I would like to send commands to the Mindstorms unit using Bluetooth. I know this is possible as while trialing some ideas in the MIT App Inventor I discovered Mindstorms command blocks.
I apologize if this is posted in the wrong place. I did do some searching around Google for a way to do this, yet I found nothing as of yet. I do not need a full script, just a link to the API/API Commands.
Many Thanks,
-James

You could have a look at the Catroid project. It's an open-source Scratch port for Android which allows you to enable NXT support in the settings.
Maybe you can find some useful information in its code.
Github: https://github.com/catrobat/catroid
Especially this part of the repo might be interesting: https://github.com/Catrobat/Catroid/tree/master/catroid/src/org/catrobat/catroid/legonxt

nikwen said:
You could have a look at the Catroid project. It's an open-source Scratch port for Android which allows you to enable NXT support in the settings.
Maybe you can find some useful information in its code.
Github: https://github.com/catrobat/catroid
Especially this part of the repo might be interesting: https://github.com/Catrobat/Catroid/tree/master/catroid/src/org/catrobat/catroid/legonxt
Click to expand...
Click to collapse
Thanks for the info. Currently reading through the source code now. Does show how much of java I have forgotten though.
Off topic but you have another supporter for your petition
-James

deadwarrior63 said:
Thanks for the info. Currently reading through the source code now. Does show how much of java I have forgotten though.
Off topic but you have another supporter for your petition
-James
Click to expand...
Click to collapse
Welcome and thanks.

Related

Visual basic for Android

A new development tool is now available for Android devices: Basic4android.
Basic4android syntax is similar to Visual Basic with support for objects.
Basic4android includes a GUI designer that supports multiple screens and resolutions.
I believe that this tool is much simpler to start with than Eclipse + Java.
Compiled applications are regular APK files, and the performance is similar to Java performance.
You can see more information here: basic4ppc[dot]com
Does it have a tutorial or may some one leave a brief training here?
thanks for finding something like this. I've always wanted to create my own apps and now I can and with this program it looks pretty good.
Does it have a tutorial or may some one leave a brief training here?
Click to expand...
Click to collapse
There are several tutorials in the documentation center.
basic4ppc[dot]com/android/documentation.html
Sorry that I cannot post working links...
Erel said:
There are several tutorials in the documentation center.
basic4ppc[dot]com/android/documentation.html
Sorry that I cannot post working links...
Click to expand...
Click to collapse
Godsend. I've been self-learning Java this week and slowing developing my first two apps using Eclipse. I've got a good grasp of the language but I was always better with vb.
Thanks heaps
I had Basic4PPC for WM Development, then Android came along. I'm glad the author has released Basic4Android as well!
Doug
Looks very promising!! Though I would have liked to see C# instead of visual basic coding. I can't even remember it anymore. It's been so long since I have used visual basic!! Lol. Maybe it's time to study up. I have refused to use have for a number of reasons!
Sent from my Droid using magical powers.
Does anyone have now experiences with that programm? I have an application written in VB for Windows Mobile. I want to change that to Android.
Would be nice to get some information before i buy this tool.
Wow, this looks interesting. Might pick this up
Edit: wow this was an old topic..
Sent from my Nexus S using Tapatalk
I tried it, seems to hard to get it to run any app, has a glitch
I tried it, seems to hard to get it to run any app, has a glitch
Click to expand...
Click to collapse
It shouldn't be difficult. If you like you can post this issue in Basic4android forums. I'm sure that it will be solvable.
I use mostly b4a, it is very simple and there is a lot of help on the forums, and people developing libraries and code classes.
I am learning on android studio now, but I have been happy developing with b4a!

XDATV Noter

Introduction
Hey guys. I'm working on an Android application for XDATV. We've never really featured a fully functional application on XDATV before. I thought it was high time we did that.
Noter is a note taking application. It is a good representation of several basic Anrdoid APIs.
source & download
Subversion Repository: http://xda-adk.googlecode.com
Project Checkout: svn checkout http://xda-adk.googlecode.com/svn/trunk/EclipseProjects/xdatv-noter
Image of app: http://i50.tinypic.com/qs8ro8.png
App download: https://code.google.com/p/xda-adk/downloads/detail?name=XDATVNoter.apk
goals
Demonstrate proper coding style and development.
Introduce n00bs to app development.
Make an expandable single-class app which will have the ability to integrate into future projects.
Questions and Contributions
If you have a question, please ask. I am in no way, shape, or form an Android app development expert. I do java more than anything else, not so much with Android. If you've got something to contribute, please do! If you spot a problem in the code, then let me know and I'll give you credit on the SVN Commit.
I think this is an awesome idea. Many of the developers here don't know the Android framework but have worked with lots of C based languages, so picking up Java (if we need to) is not that big a deal. Hopefully this will be the kind of thing that we can follow and learn the OS and framework as we go along. I know it's ideal for me, being a 20 years Windows developer.
Archer said:
I think this is an awesome idea. Many of the developers here don't know the Android framework but have worked with lots of C based languages, so picking up Java (if we need to) is not that big a deal. Hopefully this will be the kind of thing that we can follow and learn the OS and framework as we go along. I know it's ideal for me, being a 20 years Windows developer.
Click to expand...
Click to collapse
Yeah! That's the idea. Once the video is released I will publish it in the OP as well. I hope its understandable. If not, that's why we have this thread available.
The onclick view thing is handy:good:
hi adam! In the title of the video you mentioned testing, which i missed a little in the video. what methods or tools do you use for unit testing and stuff?
I'm sorry to clog up this thread with a post about help, but I couldn't find a thread for the series for tutorials Adam released about a year ago.
At around 8:34 in part one (http://www.youtube.com/watch?list=P...=31cxmLN09ss&feature=player_detailpage#t=513s), Adam adds a button to his test-app thing. It will not let me do this. It shows a no symbol over my cursor when I drag it over the display. I selected the .xml through res and layout just like he did. Only different thing I can tell I am doing is using 4.0 API instead of 2.3.
I have no experience with coding or doing work with Android so I apologize for any common mistakes.
klownk said:
hi adam! In the title of the video you mentioned testing, which i missed a little in the video. what methods or tools do you use for unit testing and stuff?
Click to expand...
Click to collapse
Just the standard tools. A device and a device emulator.
hi der!
is their any file named "notes.txt" is created.? if yes where can i find it?
and yeah thank you!.. am just a beginner and this helped me a lot!
Edit :
i also added "WRITE_EXTERNAL_STORAGE" permission in android manifest!
but still cant find noter.txt file anywhere as mentions in MainActivity.java file!
please help!
1031Vulcan said:
I'm sorry to clog up this thread with a post about help, but I couldn't find a thread for the series for tutorials Adam released about a year ago.
At around 8:34 in part one (http://www.youtube.com/watch?list=P...=31cxmLN09ss&feature=player_detailpage#t=513s), Adam adds a button to his test-app thing. It will not let me do this. It shows a no symbol over my cursor when I drag it over the display. I selected the .xml through res and layout just like he did. Only different thing I can tell I am doing is using 4.0 API instead of 2.3.
I have no experience with coding or doing work with Android so I apologize for any common mistakes.
Click to expand...
Click to collapse
You have to drag it from the bar on the left. There are a set of controls over there which you can select and drag/drop.
ateeq72 said:
hi der!
is their any file named "notes.txt" is created.? if yes where can i find it?
and yeah thank you!.. am just a beginner and this helped me a lot!
Edit :
i also added "WRITE_EXTERNAL_STORAGE" permission in android manifest!
but still cant find noter.txt file anywhere as mentions in MainActivity.java file!
please help!
Click to expand...
Click to collapse
Its in /data/data/tv.xda.noter/files/notes.txt You need to be "Noter" or root to access this file.
Nice video, thanks!
Don't forget to close your output stream; probably more dangerous than forgetting to close an input stream if anything's buffered. Also it's maybe stylistic, but I much prefer Reader/Writer for textual data. If you like System.out style, you can do:
PrintWriter out = new PrintWriter(new OutputStreamWriter(openFileOutput(FILENAME, Context.MODE_APPEND)));
Really great job Adam. I'm going to watch a second time tint and build the app along with the video, you have some points that are helpful that I hadn't thought of before.
Edit:
Adam, I just watched and built along with the video. What action did you do at 15:24, I can see you did something called Refactor, but I'm not familiar with it. Can you explain what it does and why you did it? Thank you!!!
Sent from my Nexus 7 using xda premium
marty331 said:
Really great job Adam. I'm going to watch a second time tint and build the app along with the video, you have some points that are helpful that I hadn't thought of before.
Edit:
Adam, I just watched and built along with the video. What action did you do at 15:24, I can see you did something called Refactor, but I'm not familiar with it. Can you explain what it does and why you did it? Thank you!!!
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
I just moved some code into methods and changed some names. Refactoring means renaming or moving or a number of other operations. Basically, you clean things up with a refactoring. Refactoring is an operation the IDE does safely so when methods or variables move, all the calls point at the newly refactored method or variable.
AdamOutler said:
I just moved some code into methods and changed some names. Refactoring means renaming or moving or a number of other operations. Basically, you clean things up with a refactoring. Refactoring is an operation the IDE does safely so when methods or variables move, all the calls point at the newly refactored method or variable.
Click to expand...
Click to collapse
Awesome, great to know. I'll try using this in the future!
Sweet tutorial! Will be using this as starting point for the app I want to develop. Quick issue though. When I first implement the OnClickListener, it has an error with 56 fixes available, the top two being imports. Which one of these do I pick? I see you chose something from a dropdown, but the video sped up and I can't see which one it was.
A random package said:
Sweet tutorial! Will be using this as starting point for the app I want to develop. Quick issue though. When I first implement the OnClickListener, it has an error with 56 fixes available, the top two being imports. Which one of these do I pick? I see you chose something from a dropdown, but the video sped up and I can't see which one it was.
Click to expand...
Click to collapse
There are 2 common OnClickListener classes like you say, one of them is probably View.OnClickListener and the other DialogInterface.OnClickListener. Use the View.OnClickListener any time that you are attaching it to a widget in your normal layout. Use the DialogInterface.OnClickListnener any time you have created an AlertDialog and are listening to one of its buttons.
Sweet, thank you! :good:
File Location
Hey Adam
In the video you haven't mentioned how to choose the file location.
Please guide me on this.
Thanks
pawan.dewani said:
Hey Adam
In the video you haven't mentioned how to choose the file location.
Please guide me on this.
Thanks
Click to expand...
Click to collapse
that's done in the fileinputstream portion. new FileInputStream("filename"), or you can do new FileInputStream(new File("filename", "/path/tofile"));

Good Source Code

Hello, this is my first post on xda.
I am learning how to program android apps by watching youtube videos and reading the android dev site. I was wondering what the best place for obtaining well written source code for me to read and see how well made apps are written. Is there any good sites that have this?
Brian
There are great tutorials written by Vogella (Google it).
If you are looking for complete code: github.com
And when you're programming, if you find yourself thinking "how to do this, now?", just search over StackOverflow with an [Android] tag; probably the question has already been asked; otherwise, just ask.
It's a HUGE source of code and inspiration.
Here are the FAQs.
Remember to use the code according to the License it's released on.
Be sure to check also this explanation.
Hope this helps,
bye.

[Q] Wifikill(arp spoofing) for windows ?

Hi everyone ,i`ve been searching like crazy for an app like wifikill but for windows ,anyone knows anything about this ?
Even paid software .....Thx alot.
ARP spoofing is relatively basic code; you could probably take the socket code from any open-source project that uses it and, with pretty minimal effort, port it to WinSock. This is supposed to be a developer forum, after all.
GoodDayToDie said:
ARP spoofing is relatively basic code; you could probably take the socket code from any open-source project that uses it and, with pretty minimal effort, port it to WinSock. This is supposed to be a developer forum, after all.
Click to expand...
Click to collapse
I was thinking about something with a gui . ?
So, use VS and whip up a quick GUI around it... I mean, I see no point to doing that (CLI is just fine) but if you want to, it's not like Visual Studio is hard to use.
cosminmocan said:
I was thinking about something with a gui . ?
Click to expand...
Click to collapse
don't know if it's way too late, but i found netcut recently, see if it suits you.
adcpeda said:
don't know if it's way too late, but i found netcut recently, see if it suits you.
Click to expand...
Click to collapse
Any download link ? I only find malwares

Looking for a Jolla Sailfish developer (NO JOB!)

Hi!
this is NOT a job posting.
I an developing an open source GPS tracking application (www.trackaway.org) in Qt5 and i am targeting Android at the moment, but since Qt5 supports Salfish as well, it would be interesting to built it for Sailfish and test it out.
Since i don't have a Jolla phone nor the time to setup an SDK, if anybody is willing to try it out, please contact me!
thank you.
(being open source and free, of course, this is for the grather good and not a job)
i can try it four you.
have sdk installed and a jolla and also a defy+
Cool!
the source code is at http://hg.trackaway.org/index.cgi/trackaway-3/ you can checkout with username and password i am sending you via PM.
Anybody else interested let me know, i will provide the password via PM
frullewulle said:
i can try it four you.
have sdk installed and a jolla and also a defy+
Click to expand...
Click to collapse
Did you try?
gardiol said:
Did you try?
Click to expand...
Click to collapse
not jet, not much spare time over at the moment...
i'll see to try it tonight
No rush, I was just wondering

Categories

Resources