[Dev][RELEASE][Lib/Java] JDroidLib Java ←|→ Android Communications Library - Android Software Development

Hey there,
many of you are probably familiar with @regaw_leinad's AndroidLib.
It is a really nicely coded, and easy-to-use .Net class library, which allows real easy communication with Android devices.
regaw_leinad said:
AndroidLib is a .NET assembly written in C# (C-Sharp) that easily handles communication between a connected Android device and your program.
Click to expand...
Click to collapse
However, it has a downside. That downside being; it only works with .Net languages. .net languages include:
Code:
# Visual Basic
# C#
# F#
# Visual C++
# ASP.Net
As you might have guessed, Java does not belong to the .Net language set.
And as I moved from .Net to Java (allows my projects and libs to become available to a wider audience), I don't have the privilege to use AndroidLib, which is a real bummer.
This is why I have started JDroidLib.
​
Edit (08.10.2017): JDroidLib is being replaced by JDroidLibv2!
For anyone coming across this thread; this version of JDroidLib, while still available, is considered obsolete and is being replaced by JDroidLibv2!
https://forum.xda-developers.com/android/software-hacking/lib-jdroidlibv2-t3684697
EDIT: 01.03.2014
JDroidLib has undergone some major updates, with loads of kinks fixed, and features revamped.
See the lists below for more info. (Everything has changed, there).
Oh, and the code has a kind of easter egg
Current features:
Code:
# Execute any type of ADB command from a single method.
(This method always returns output, but you can execute the method, without grabbing it).
# Execute any fastboot command frmo a single method. (Same returns as above.)
# Install ADB/fastboot to either fixed, or custom location. (On MAC OS/Linux: Binaries are automatically chmod-ed!)
# Pull entire build.prop from device to hard drive
# Get single build properties ([B]!!![/B])
# Push build.prop back to device.
# Reboot device (5-way/ADB + fastboot)
# Get list of devices. (Returned as generic List<String>)
# Get device information (Battery, SU, BusyBox, CPU - MORE COMING!)
# Get device state
# Start ADB server
# Stop ADB server
# Restart ADB server.
# Much, much more. See JavaDocs for more!
Current bugs:
There's a weird bug in the Battery department, where the loaded battery level is 0. Looking into it! Fixed.
Slight bug in reboot methods, device isn't rebooting. Fixed.
Click to expand...
Click to collapse
Planned features:
Code:
# Get phone/WiFi/BlueTooth/etc. information
# And anything else that comes to mind!
License:
Code:
/*
* Copyright (C) 2013 Simon/Beatsleigher.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
Source code:
To get a copy of the source code, visit my GitHub
There will be no pre-compiled JARs. To get a JAR, you have to download and compile the source.
The IDE used is NetBeans 8.0 with JDK 7
To download NetBeans, visit http://netbeans.org
JDroidLib Documentation:
http://team-m4gkbeatz.eu
How to Use JDroidLib:
http://www.youtube.com/watch?v=dRSwailf7GI
Thanks:
Thanks to @regaw_leinad for having the original idea!
Thanks to you, XDA, for taking the time and looking at my programs/libs. Much appreciated!
XDA Portal Story 04.12.2013
Newer XDA Portal Story 03.03.2014
Have fun with JDroidLib and don't forget to contribute your own code!

This project made it to the Home Page!
http://www.xda-developers.com/android/a-new-android-communications-library-jdroidlib-java/
Congrats mate
Subscribed!

zylor said:
This project made it to the Home Page!
http://www.xda-developers.com/android/a-new-android-communications-library-jdroidlib-java/
Congrats mate
Subscribed!
Click to expand...
Click to collapse
(^-^) Awesome
But where did that other thread come from?

You know, you could always contribute to CASUAL. We use Java and NetBeans as well and we are already a few years ahead of you. We could pull out the ADB/fastboot/busybox/Heimdall portions of CASUAL to distribute separately, by making some small changes to our make file and would have what you're going for here.

AdamOutler said:
You know, you could always contribute to CASUAL. We use Java and NetBeans as well and we are already a few years ahead of you. We could pull out the ADB/fastboot/busybox/Heimdall portions of CASUAL to distribute separately, by making some small changes to our make file and would have what you're going for here.
Click to expand...
Click to collapse
Wow. Never would have thought you'd reply to or even look at one of my threads!
It's a good idea. I'll have a think about it. I'm going to keep working on this, mainly because someone (or even I) could eventually port it to C/C++ if they need to.

Beatsleigher said:
Wow. Never would have thought you'd reply to or even look at one of my threads!
It's a good idea. I'll have a think about it. I'm going to keep working on this, mainly because someone (or even I) could eventually port it to C/C++ if they need to.
Click to expand...
Click to collapse
hey I've just done a draft for a python adb (PyAdb) which removes entirely the dependence of the adb binary. when you get into it, it's actually quite simple to replicate it. I've added reference links in my thread as well, and the python is so simple you can see how it all works
http://forum.xda-developers.com/showthread.php?t=2574326
ping me if you want any help with anything. I'm getting on with my java studies so I may be able to help with porting it over

cybojenix said:
hey I've just done a draft for a python adb (PyAdb) which removes entirely the dependence of the adb binary. when you get into it, it's actually quite simple to replicate it. I've added reference links in my thread as well, and the python is so simple you can see how it all works
http://forum.xda-developers.com/showthread.php?t=2574326
ping me if you want any help with anything. I'm getting on with my java studies so I may be able to help with porting it over
Click to expand...
Click to collapse
The main reason I coded this is for use in my own programs, coded in Java.
I guess the Python wrappers coded by you and the other member, are for use with the Python interpreter.
But I guess I could help port stuff over and you could help with JDroidLib.
Sent from my GT-I9505 using XDA Premium 4 mobile app

Beatsleigher said:
The main reason I coded this is for use in my own programs, coded in Java.
I guess the Python wrappers coded by you and the other member, are for use with the Python interpreter.
But I guess I could help port stuff over and you could help with JDroidLib.
Sent from my GT-I9505 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Sorry you got the wrong end of the stick. The one by me is an adb client in python, not a wrapper. I was suggesting look at the methods it uses so the same can be done for JDroidLib, without needing a dependence on the adb binary. It's just commands passed via TCP
Sent from my Nexus 7 using Tapatalk

cybojenix said:
Sorry you got the wrong end of the stick. The one by me is an adb client in python, not a wrapper. I was suggesting look at the methods it uses so the same can be done for JDroidLib, without needing a dependence on the adb binary. It's just commands passed via TCP
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
Ahhh. I gotcha. Sure. If you want, check out the source and see what you can do. I'll take a look at it as soon as I've finished my Tekkit server and got DetectCPUv3 done.
Sent from my GT-I9505 using XDA Premium 4 mobile app

JDroidLib is back, and beter than ever!
Hey guys,
I was asked by a few friends and other people, if I had abbandoned JDroidLib, because I wasn't updating it for so long, so I haven't abbandoned it, nor have I abbandoned any other projects of mine, which are currently being ported to Java, it's just time consuming, and I'm looking for jobs at the moment, so I'm not on as much, and I don't have that much time to do things.
But, I have picked up JDroidLib again, and added some new features!
Basically, I've re-written the entire thing in under a day, because the code that was originally in there was real messy and I thought I may as well.
The new features include:
Code:
Device listing
Comand execution (now made really simple and squashed into two-three methods)
Rebooting the device (now one method, and uses internal enums)
I've revamped the installer, so other programs can install the binaries to their desired location, however, for operation, the default location will be used.
And (finally) I've got the Battery class, so developers can easily get battery stats!
Also, I've added a BuildProp class, which allows you to pull the file to a location on the HDD, read individual props and push the file back!
Currently, I'm sorting out the CPU class, which will, similarly to the Battery class, get CPU info, like currently running processes and CPU load.
So, check out the GitHub repo, and watch it to get the latest stuff!
Feel free to add your own code, classes, whatever and I can't wait to release this puppy into the wild! (Metaphorically speaking, that is... )

### UPDATE ###
JDroidLib has gotten a huge update!
This update fixes a major bug in EVERY program using JDroidLib in Windows systems!
Please pull and build a new copy of JDroidLib, before continuing with any of your work!

Although I'm not a big fan of Java, I prefer C#
Your library made me rethink of porting Droid Manager (Which uses AndroidLib) to Java in-order to make it available for every one.
Let's see what I can do :fingers-crossed:
Thanks for your efforts :highfive:

OmarBizreh said:
Although I'm not a big fan of Java, I prefer C#
Your library made me rethink of porting Droid Manager (Which uses AndroidLib) to Java in-order to make it available for every one.
Let's see what I can do :fingers-crossed:
Thanks for your efforts :highfive:
Click to expand...
Click to collapse
-- Post deleted --
Reason: Didn't read post correctly and I take back what I said.
Sent from my GT-I9505 using XDA Premium 4 mobile app

Beatsleigher said:
-- Post deleted --
Reason: Didn't read post correctly and I take back what I said.
Sent from my GT-I9505 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Although I didn't read what was written before :angel:
I would like to ask you, have you ever written or know something about using Java to write a service that can run on Linux and Mac?!
I only know how to write a windows service using C# Unfortunately

OmarBizreh said:
Although I didn't read what was written before :angel:
I would like to ask you, have you ever written or know something about using Java to write a service that can run on Linux and Mac?!
I only know how to write a windows service using C# Unfortunately
Click to expand...
Click to collapse
As far as I'm aware, it's just a program that runs in the background. So it shouldn't be difficult to code. Maybe a few threads and things, and it should work. Otherwise, Google is your friend. Personally, I've never written a service in Windows or BSD, so I have no idea how they work. But I can imagine it shouldn't be too difficult.
Sent from my GT-I9505 using XDA Premium 4 mobile app

Beatsleigher said:
As far as I'm aware, it's just a program that runs in the background. So it shouldn't be difficult to code. Maybe a few threads and things, and it should work. Otherwise, Google is your friend. Personally, I've never written a service in Windows or BSD, so I have no idea how they work. But I can imagine it shouldn't be too difficult.
Sent from my GT-I9505 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
well coding isn't difficult, I suppose I will google it, since writing the core of the service isn't difficult, it's just how I do I do a service written in Java :fingers-crossed:

OmarBizreh said:
well coding isn't difficult, I suppose I will google it, since writing the core of the service isn't difficult, it's just how I do I do a service written in Java :fingers-crossed:
Click to expand...
Click to collapse
You'll manage, I'm sure
If you need any code examples, check out my UniversalAndroidToolkit repo on GitHub. It's all commented and documented, and I think I write pretty clean code, so it shouldn't be too hard to figure out
Sent from my GT-I9505 using XDA Premium 4 mobile app

Beatsleigher said:
You'll manage, I'm sure
If you need any code examples, check out my UniversalAndroidToolkit repo on GitHub. It's all commented and documented, and I think I write pretty clean code, so it shouldn't be too hard to figure out
Sent from my GT-I9505 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Thanks a lot I really appreciate your help
I will make sure to browse your git repo :highfive:

OmarBizreh said:
Thanks a lot I really appreciate your help
I will make sure to browse your git repo :highfive:
Click to expand...
Click to collapse
No probs. If anything's unclear, just shoot me a PM and we'll get things sorted

Beatsleigher said:
No probs. If anything's unclear, just shoot me a PM and we'll get things sorted
Click to expand...
Click to collapse
Thanks man, I really appreciate it ::highfive:

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!

[Q] Best way to get up to speed?

I've been programming off and on since the Commodore 64, but I've been out of it for a while (lack of time) and I'm just getting back into it. Now I'm interested in Android development, which I see is done on Java. I've done C and C++ programming, including up-close-and-personal-with-the-hardware programming, but I haven't done Java. I've also done Unix, HP-UX, and Linux shell scripting, so I have about an intermediate understanding of the unix flavors.
Given that, what's the best source of information on Android and Java? Inquiring minds want to know!
Hey I had a Commodore64 ! I remember typing in hexcode (and basic of course) to create programs.
Anyway, u might find good advice on Google's android development website...sorry don't have the address handy.
Sent from my SAMSUNG-SGH-I997 using Tapatalk
andrawer said:
Anyway, u might find good advice on Google's android development website...sorry don't have the address handy.
Click to expand...
Click to collapse
See the following website. I hope that this is the site to which you were referring.
developer(dot)android(dot)com(slash)index.html
Sorry, but could not post the actual address due to not having enough posts.
rjk4116 said:
See the following website. I hope that this is the site to which you were referring.
developer(dot)android(dot)com(slash)index.html
Sorry, but could not post the actual address due to not having enough posts.
Click to expand...
Click to collapse
Thanks, I'll check that out.
Serial_Noob said:
I've been programming off and on since the Commodore 64, but I've been out of it for a while (lack of time) and I'm just getting back into it. Now I'm interested in Android development, which I see is done on Java. I've done C and C++ programming, including up-close-and-personal-with-the-hardware programming, but I haven't done Java. I've also done Unix, HP-UX, and Linux shell scripting, so I have about an intermediate understanding of the unix flavors.
Given that, what's the best source of information on Android and Java? Inquiring minds want to know!
Click to expand...
Click to collapse
I am a big fan of Pluralsight training (www-pluralsight-dot-com). They have some great Android development training, and you can do a free 10-day trial (so just learn fast...lol...). I happened to win a 1-year "Plus" subscription at a Microsoft event last year, and have thoroughly enjoyed it (especially the Android stuff -- helps you set up everything from square one -- Eclipse, Android SDK, etc.). Good luck!
-- ktalley

[App][Project][WiP] OpenDroidApps

Hey guys,
I've been developing for Android as a kernel developer from around a year, and one thing I like about it is that it is open. It helps in getting patches from other developers, and implement new features.
Recently I've started learning Application Development, and I feel there is one thing that is missing with it. The Openness like the AOSP android source and ROM's...
So here, I am to kick-start a project to develop Open Source Android Applications. We can have a collection of different apps, and update them on the market for the whole world to use.
OpenDroidApps​
Different Apps Planned:
Launcher
Messaging
Contacts
Dialer
Music Player
And Many More...
So, this is a request to all the app developers out there, to come join me in developing a collection of different apps with excellent features and options.
Required:
App Developers
Sources to start of the apps
Website
nice idea
specially the music player one
fire_kid2003 said:
nice idea
specially the music player one
Click to expand...
Click to collapse
Thanks
Shouldb start working on the project today...
sources will be from the android 4.0.4 r1.2...
And any developer wanting to contribute to the project let me know...
Sent from my GT-I9100 using XDA
I am confused whether I can use the android open source code provided by google as the base to build the apps ? Will it be violating and licence ? Can anyone clear my doubts ?
Read the licence, for the most part, if your code stays open, you are safe in forking a project. As long as you dont sell the code as your own and keep it opensource. That way improvements cant be submitted upstream, which is the core of FOSS, enhancing projects, fixing bugs and building better software
cornelha said:
Read the licence, for the most part, if your code stays open, you are safe in forking a project. As long as you dont sell the code as your own and keep it opensource. That way improvements cant be submitted upstream, which is the core of FOSS, enhancing projects, fixing bugs and building better software
Click to expand...
Click to collapse
But i will be changing the package names initially itself...coz i dont think you can upload an app to the market with the package com.android.... So is this allowed?
Sent from my GT-I9100
Dharam_Maniar said:
But i will be changing the package names initially itself...coz i dont think you can upload an app to the market with the package com.android.... So is this allowed?
Sent from my GT-I9100
Click to expand...
Click to collapse
Wouldn't be allowed most probably, you'll need to change the package name and possibly add a note starting that you used sources from blah and blah.
Even if the same package name was allowed, you'ld be signing your apps with your own key, and the original apps on the device would be signed by the OEM's key, but with the package name being the same, Play Store would show it as an update, but installing it won't work, and that'ld cause issues.
So, as long as you name it anything other than the default name, and provide source code to public, and keep the apps free, it won't cause any problem.
Read through the Play Store ToS once if you're in doubt, or contact the staff if you still have doubts
I am interested. Just started with app development a couple of months back
Also intersted ill help with anythong....
Sent from my VS910 4G using xda premium
I would also help, if needed
Add Clock to the app list: Most proprietary clock apps provide timer and stopwatch but aosp does not - so it should be added
I think it is not needed to do another launcher - there are enough aut there.
And the license thing: nearly everything in android is Apache licensed, which means that you only need to mention original source in the app - it is not needed to publish the source code, however i would like to say that i would not work on a project that is licensed proprietary or pseudo-free (GPL)
MaR-V-iN
suhas_sm said:
I am interested. Just started with app development a couple of months back
Click to expand...
Click to collapse
motodroidfreak said:
Also intersted ill help with anythong....
Sent from my VS910 4G using xda premium
Click to expand...
Click to collapse
MaR-V-iN said:
I would also help, if needed
Add Clock to the app list: Most proprietary clock apps provide timer and stopwatch but aosp does not - so it should be added
MaR-V-iN
Click to expand...
Click to collapse
Thanks for the interest guys...
I was waiting for a reply on the licence issue...Seems there shouldn't by any problems...
So we can start off with the project...
I'll try to setup everything soon and we can then work on the apps
Dharam_Maniar said:
I was waiting for a reply on the licence issue...Seems there shouldn't by any problems...
So we can start off with the project...
Click to expand...
Click to collapse
See my post - i wasnt fast enough in editing
MaR-V-iN said:
See my post - i wasnt fast enough in editing
Click to expand...
Click to collapse
I didn't understand. The project will have all the apps on the market for everyone to download, and the source code will be hosted on github so that we can improve the code be providing patches...So you are interested or no ?
For web i can help you
Let me know
Sent from my Xperia Play using Tapatalk 2
Dharam_Maniar said:
I didn't understand. The project will have all the apps on the market for everyone to download, and the source code will be hosted on github so that we can improve the code be providing patches...So you are interested or no ?
Click to expand...
Click to collapse
Just saying it is open source does not make clear which license to use - i would suggest Apache License as it is my favourite one and i would not like GPL as i hate how they force developers to make everything opensource what is really **** for business developers...
Just say it will be Apache License and you got me in
MaR-V-iN
MaR-V-iN said:
Just saying it is open source does not make clear which license to use - i would suggest Apache License as it is my favourite one and i would not like GPL as i hate how they force developers to make everything opensource what is really **** for business developers...
Just say it will be Apache License and you got me in
MaR-V-iN
Click to expand...
Click to collapse
Actually speaking, I don;t understand most of the license stuff...
But If we see the source of the apps provided by google in AOSP, it says
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
So, I guess it will be Apache Licence...But I would like to tell you, that these apps will be complete open source...Its not a project for business but for developing great apps for the community, by the community...Anyone and everyone can help in improving these apps.
I'm no dev but if I'm understanding correctly you will set up the environment on github ,everyone can just push in code and from time to time u publish the latest apks to the market right?
Sent from my SGS2 powered by cm9 love
bartoloandre98 said:
I'm no dev but if I'm understanding correctly you will set up the environment on github ,everyone can just push in code and from time to time u publish the latest apks to the market right?
Sent from my SGS2 powered by cm9 love
Click to expand...
Click to collapse
Yes... You understand correct...
Dharam_Maniar said:
Yes... You understand correct...
Click to expand...
Click to collapse
Make an org on github, would be the best way
Sent from my GT-P1000 using XDA
cdesai said:
Make an org on github, would be the best way
Sent from my GT-P1000 using XDA
Click to expand...
Click to collapse
did that long back
Just busy with my other project also...i.e. the DarkKnight Kernel for CheckROM ICS (Galaxy S2)

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"));

[APP][DEV][WIP] DemiGod RPG for android

Hello everyone,
This is my first thread on XDA, and also my first time using github. I have been learning java for android for ~3 years now, and feel there is still much to learn. As an all-time gamer, I would absolutely love to make one of my own.
I have recently started my 1st open-source project on github. I am still learning quite a bit, and am looking to create a retro-style, turn-based RPG for android. Any collaberators feel free to chime in, offer advice, bring new ideas to the table, etc...
This project is just beginning and the downloads may not be fully functional as of yet. Downloads serve mainly for testing purposes for now, but feel free to check it out. Please let me know what you think.
WORKING SO FAR:
* Stats and Inventory Databases
* Character creation (Choose name and class)
* Simple Battle mechanics
* Enemy Database
* Random enemy from database used in battles
* Level-ups
* Status Screen
* Viewing pre-populated Inventory (No using/exchanging items yet)
KNOWN ISSUES:
* Re-positioning Virual D-Pad when it's size is bigger than screen causes a force close
* D-Pad position gets skewed when re-sizing caused by it not accommodating for D-Pad Position setting
* Map's/Area's bounds are not set (Graphics still being worked on)
Storyline:
Unknowingly, you are a demigod. Half mortal, half god. Ever since your early teenage years, you have had "incidents" in which you never quite understood the nature of. Sudden outrages, blackouts, and waking up feeling completely exhausted.
The more the hero aged, the more frequent the uncontrollable events would occur. Finally the hero can't help but to believe it is some sort of witchcraft, cursed as a child. For this may not be completely false, the hero is soon to find out his true origins...
Github link: https://github.com/MattMatt0240/DemiGod
* Licensed under GNU GPL v3
Credits:
@nikwen (introducing the idea of open-source to me/ help in development threads)
@ADDICT.ANK (collaborator, helping hand)
@sak-venom1997 (collaborator, helping hand)
Please let me know if you're left out
FAQs/downloads/screenshots
Download:
* Alpha v0.02 (Preview/Testing)
* Alpha v0.01 (Preview/Testing)
MattMatt0240 said:
Credits:
@nikwen (introducing the idea of open-source to me/ help in development threads)
@ADDICT.ANK (collaberator, helping hand)
Please let me know if you're left out
Click to expand...
Click to collapse
Well great. Thanx bro you created the thread required
and pls reserve a couple of post row for later updating..
Lets go for it then.
As i developer i see firm reasons to join it
But few questions arise in my mind and it will be good for all if answered in the op
* What is the storyline for this game ?
* Under which lisense is this app available ? (Creative Commons ,GPL ..)
I suggests adding requests for things you want to add in the github repo
Sent from my GT-S5302 using Tapatalk 2
sak-venom1997 said:
As i developer i see firm reasons to join it
But few questions arise in my mind and it will be good for all if answered in the op
* What is the storyline for this game ?
* Under which lisense is this app available ? (Creative Commons ,GPL ..)
I suggests adding requests for things you want to add in the github repo
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
Thanks for the suggestion. This is my first thread here on XDA, also my 1st time using github(or any repo for that matter).
Pretty much my 1st time taking my code anywhere else from my personal computer and sharing my code/ideas with anyone besides my wife (who could care less about all of it). I have been learning java/android all by myself for a while, and could use some help and/or insight from someone more experienced.
Welcome aboard :thumbup:
Noted to self thrice via tapatalk
MattMatt0240 said:
Credits:
@nikwen (introducing the idea of open-source to me/ help in development threads)
@ADDICT.ANK (collaborator, helping hand)
@sak-venom1997 (collaborator, helping hand)
Please let me know if you're left out
Click to expand...
Click to collapse
Haha. Thanks.
MattMatt0240 said:
Reserved for FAQs/downloads/screenshots
Click to expand...
Click to collapse
Wow, looks good. Is that a mockup or do you already have this working?
nikwen said:
Haha. Thanks.
Wow, looks good. Is that a mockup or do you already have this working?
Click to expand...
Click to collapse
I started working on this a while back (in a different project to learn from). Realized many of my errors in doing so, so started fresh. The screenshot is just a basic idea of how I want the gameplay to look like, and is not quite functional yet. I do all of the art myself (so far) but there are many aspects in which I'm not quite sure how to make work, such as inventory/shops, and maps.
If there's anything you see that you feel can be improved, please feel free to let me know
Thanks nikwen!
Noted to self thrice via tapatalk
Would you mind pushing the merged code to new branched and deleting the bin folder
These non essential files make the repo huge and people like me with slow internet have problems synchronising
Sent from my GT-S5302 using Tapatalk 2
sak-venom1997 said:
Would you mind pushing the merged code to new branched and deleting the bin folder
These non essential files make the repo huge and people like me with slow internet have problems synchronising
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
Yeah, I meant to do it sooner. Been busy the last few days, will do it soon. Should be done by the time you get on. I don't have much of a base yet, this is really just the start of an idea.
Noted to self thrice via tapatalk
Should be good now sak. I have slow internet as well, very slow unless I manage to find 4g at my house. I downsized the repo quite a bit, so it should be better for us all
Noted to self thrice via tapatalk
@sak-venom1997 I added a PreferenceActivity (settings) and made the D-Pad repositionable via those settings
If you get a chance, check it out and let me know what you think.
Noted to self thrice via tapatalk
MattMatt0240 said:
@sak-venom1997 I added a PreferenceActivity (settings) and made the D-Pad repositionable via those settings
If you get a chance, check it out and let me know what you think.
Noted to self thrice via tapatalk
Click to expand...
Click to collapse
What's about posting apks here or on Github every now and then? I'd love to give it a try but I don't want to build it myself every time.
nikwen said:
What's about posting apks here or on Github every now and then? I'd love to give it a try but I don't want to build it myself every time.
Click to expand...
Click to collapse
Wow, still new to github, didn't know they had a release system I could do that and put a link in the O/P. Keep in mind that (at this point) it isn't necessarily playable, but at least everyone could get a feel for it and put up suggestions
Noted to self thrice via tapatalk
MattMatt0240 said:
Wow, still new to github, didn't know they had a release system I could do that and put a link in the O/P. Keep in mind that (at this point) it isn't necessarily playable, but at least everyone could get a feel for it and put up suggestions
Noted to self thrice via tapatalk
Click to expand...
Click to collapse
Exactly.
So do it and lets gather the suggestions.
Sent from my LT26i using xda premium
nikwen said:
What's about posting apks here or on Github every now and then? I'd love to give it a try but I don't want to build it myself every time.
Click to expand...
Click to collapse
ADDICT.ANK said:
Exactly.
So do it and lets gather the suggestions.
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
Added download link to 3rd post. Constructive criticism is welcomed
Noted to self thrice via tapatalk
MattMatt0240 said:
Added download link to 3rd post. Constructive criticism is welcomed
Noted to self thrice via tapatalk
Click to expand...
Click to collapse
Thanks.
Looks good. Crashes very often but it's good considering that it's in its infancy. :good:
Will the character turn around when he's moved?
For sure I'll follow the development.
nikwen said:
Thanks.
Looks good. Crashes very often but it's good considering that it's in its infancy. :good:
Will the character turn around when he's moved?
For sure I'll follow the development.
Click to expand...
Click to collapse
Yes, I just need to crack down on drawing up some sprites Lol. Crashes may be caused by not creating a character first, and possibly a few other things that will be put in order in final production.
I was thinking of having the user being presented with a "setup" screen where they will have to adjust the D-Pad position and size. There's a few bugs in there I think. All of the activities are placed on the title screen temporarily simply for ease of access during development.
Regardless, thanks for the feedback, and yes it is still very early. I'm trying, and learning a whole lot quite fast
Noted to self thrice via tapatalk
Just a little update:
I have been working on trying to find an organized mapping system and think I found a satisfying solution. Before it was all hard-coded in java files leaving it a mess to read, and an activity for every "map" area.
Now, the maps will all be written in XML with a number identifier, which corresponds to the appropriate tile, translated by a separate java class. I tried using JSON, but @nikwen made a valid point... XML is more versatile and easier to read/use, thanks bud!
The inventory database has the path to the corresponding asset icon for each item, making it possible to match "xItem" with its relative icon. I was thinking I should do the same for enemies (once they are drawn). Enemy images are 100x100 pixels, used in battles, whereas item icons are the standard 32x32 px.
I also started playing around with animations, and obviously have much to learn on it.
I'll update the OP with another download, not much progress but still a lot of changes. Anybody feel free to chime in.
Noted to self thrice via tapatalk
MattMatt0240 said:
Just a little update:
I have been working on trying to find an organized mapping system and think I found a satisfying solution. Before it was all hard-coded in java files leaving it a mess to read, and an activity for every "map" area.
Now, the maps will all be written in XML with a number identifier, which corresponds to the appropriate tile, translated by a separate java class. I tried using JSON, but @nikwen made a valid point... XML is more versatile and easier to read/use, thanks bud!
The inventory database has the path to the corresponding asset icon for each item, making it possible to match "xItem" with its relative icon. I was thinking I should do the same for enemies (once they are drawn). Enemy images are 100x100 pixels, used in battles, whereas item icons are the standard 32x32 px.
I also started playing around with animations, and obviously have much to learn on it.
I'll update the OP with another download, not much progress but still a lot of changes. Anybody feel free to chime in.
Noted to self thrice via tapatalk
Click to expand...
Click to collapse
Good progress.
Looking forward to more improvements.

Categories

Resources