First time posting here! I'm a beginner in learning java and everything Android-related.
So, I'm stuck on a probably simple thing (I believe the answer is pretty simple too):
I'm creating a riddle game, where on each question/activity you're asked about something and when you give the right answer, the game lets you proceed to the next question. So far so good.
My problem is that I cannot comprehend how a "Continue" button (placed on the Main Menu) works, and what could be the code behind it. I mean, how will the game remember how far you've reached, and then give you the option to continue from there. I can only make the button take you to a specific level.
I hope there's no need for me to paste my code - if needed please tell me.
Thanks in advance!
Study Android SharedPreferences, it can be used to store simple data which can be used to keep track on the level.
Android Shared preferences example
Related
I am a student working on a senior project. It will be a very simple android app to organize karaoke. We are using Flutter for the front-end work.
My education has been in Java, but this is my first time working with Dart/Flutter, let alone on a smartphone app. I have gone through Get Started (https://flutter.io/get-started/), as well as 2-3 step-by-step youtube tutorials that help you build very simple apps from scratch. These have been helpful, but I'm still having trouble wrapping my head around the organization of a Flutter app. All tutorials say "everything is a widget", as if that should make things simple. And maybe it does in the end. But I end up with so many widgets, and I am getting confused about what widget should be inside what other widget and why.
Take a look at this picture (in the middle of the picture I have the widget-tree on display). I have a stack, two columns, scaffold, container, etc. Do I really need all of those? Is this normal for a simple login page?
What helped you get a grip on Flutter? Or maybe it is app development, rather, that I am having trouble understanding. Regardless, I am getting a bit discouraged. Any advice? Maybe there is a particular tutorial that helped you a lot?
Thank you for any help.
I like to learn by downloading and running examples from the developers (like these ones in their GitHub repo).
One thing I struggled with at first too from the whole "everything is a widget" idea was figuring out how to handle state / data changes appropriately. If you're struggling with that, this Google I/O video does a great job showing how you can better architect an app in regard to handling state in a reactive way. A bit more advanced, but from beginning to end they go from their opinion on the worst way to handle state changes to their recommended way(s).
I always get this these two confused with together. I just wanted to know the difference I'm new to android development and I'm learning as I go along.
It is called Activity. But there can be Fragments within a activity. But it can be somthing else, depending on what you call a Android page to be!
And a View is the class on which all the UI components are build!
There is nothing to be confused at!
You head over to https://developer.android.com/training/index.html
It is the best to get started!
There are plenty of resources just to let you clear your doubts, you should try making a google search before posting a query here.
I want to make an app, a kind of "Never have I ever" but with cards. When a "tricky" card appears I want to display an animation like that:
A image with text apears from the right side of the screen and stops on the centre. Waits a few seconds (3-4). In that waiting time it could size up a bit or something like that. Finally it goes out by the left side of the screen.
I have found out a similar animation in a game called Clash Royale.
http://i.imgur.com/8kB18dj.gifv
Thanks on advance.
*As note: I will develop it on Android Studio.
I need help doing it, examples por something like that. If you put the conde I will be thanked.
If I get you right, you want help with the basics of animation in android...
I know, that this is probably not exactliy what you wanted to hear or read, but you have to get into the huge topic 'animation' by yourself - I think you won't find someone, who does that specific animation for you.
A good way to start may be the following tutorial on how to make some real basic animation stuff:
YouTube Tutorial Part 62 (and the following)
I walked through this tutorial series by myself and it really helped me a lot.
Also this seems to be a good tutorial about animations.
Good luck and have fun!
I am a beginner at android app development. I have an idea of an app, but I first need to set my bearings straight. So instead of confusing you with the complexities of the app, I just want to ask a question. Obviously, I do not expect anyone to write me the entire code, instead just to guide me to the right path by indicating which methods, classes or keywords to look for.
I want to know how to create several instances of the same image. I am planning on having a toolbar with all the tools that you can select and then a workspace where you will be putting those tools. Ever played a tower defense games, you know how you have a toolbar with selection of towers to choose from and then you simply drag and drop them on the map? something like that. Please also guide me on which layout would best suit this type of application.
I understand the question is too broad, but any kind of help to get me started would immensely help.
For a game, you don't want to use native View objects. Here's a guide on Android game development.
Here is a simple example of a Sprite based game for Android.
I personally think that you are going the wrong way here. Just like if you wanted to build a house you wouldn't start from building the roof, first you need to get a book (I would recommend the Busy coders guide to android development) or start reading (or watching on youtube) a tutorial and just start learning to code in android. Get better at it and in some time you will understand better on what and how you can do with the platform. There are tons of stuff for you to learn before you will be able to do even simple stuff, but believe me learning android is very exciting and the feeling you get when developing an app should be what drives you forward. Hope this helps.
I try to implement Scoreloop in libgdx. I used some tutorials here and here. When I run the game and try to show the higscores with showscoreLoop() I have to accept TOS first. After pressing "enable" (accept) window with "Connecting, please wait" show and nothing happens...When I minimize the app and start it again, I get the nullexception when I try to access the highscores again.
Any help here? I'm really desperate as there is almost no support for Scoreloop..
I realize this doesn't answer your question directly, but it might end up saving you a good bit of time in the long run.
We've had some good success with LibGDX projects using Swarm (aka SwarmConnect) for leaderboards in Android games. Integration is pretty straight forward as long as you initialize at the end of onResume() and remember to make calls to Swarm.setActive() and Swarm.setInactive() in the right places. It's documented pretty well though.
If you go to the LibGDX forums and do a quick search for SwarmConnect, you'll find plenty of links to threads that can help :). Cheers!