One of the best ways to communicate with database is to use web services. Web services are software as a service web application components which communicate with the server securely using token authentication and produce output in xml or json format for various platforms to easily use. Android, IOS, windows apps and even websites can therefore be easily be synchronized. To update the database we use GET or POST methods. GET method in PHP has all the parameters in the URL while post method doesn’t use URL parameters and is more secure way of sending data. In this tutorial we will look at how to use GET and POST methods in android to update database and retrieve data from database using JSON parsing. We will also look at uploading images to the server and maintaining a URL record in the database along with downloading and displaying images from the URL using Volley. You can download google volley library using Download Volley link.
Volley is a networking library developed by Google for the Android SDK to work with server communications without interfering the user interface. The HTTPClient method which was used earlier was not only longer in terms of code because of inclusion of AsyncTask and parsing but was required for each instance of accessing the server. Android API level 22 and above seem to have stopped giving support to that process and libraries like Google Volley and Retrofit are rather more popular among android developer communities because they not only remove the headache of asynctask for each instance but also manage caching of data and work with multiple tasks at one without issues. Parsing json is far more easier now than ever before with volley and retrofit. However, in this tutorial we will only look at Volley’s methods because its updates are supported by Google.
Continue reading Google Volley guide to working with web services using PHP, MySQL and Android Studio Tutorial
What is data structure?
A data structure is structured organization of data items. While Abstract Data Type defines what is to be done, data structures define how it will be implemented. Example: Trees, Graphs and Linked Lists.
What are the basic operations that a data structures should do?
A data structure can insert, delete and find data elements basically. Other operations include merge, find predecessor, find successor, modify/update, find min/max, delete minimum/maximum etc..
What is a data type?
Data type defines collection of objects and the set of operations that can act on them.
What are the different types of data types?
1. Primitive : int(short, long), boolean, char, float(double), string i.e. array of char (Operations on these data types are well defined by the language like arithmetic, logical operations, increment, decrement etc.. )
2. Non primitive (ADTs): Linear – Arrays, Stacks, Queues, Linked lists and Non Linear – Trees, Graphs (What operations can be performed is defined but not how!)
What are commonly used values of Big O notations?
1. O(1) means a constant computing time
2. O(n) means linear computing time
3. O(n2) is quadratic
4. O(n3) is cubic
5. O(2n) js exponential computing time
6. O(log n) is called logarithmic
7. O(n log n) is better than O(n2) but not better than O(n) eg: find an element takes O(log n) time in a binary search.
Continue reading A Quick Summary of Data Structures Concepts
Its a very interesting news for the Pokemon Go players that Niantic has updated their app with the “Buddy System” which is almost releasing anytime soon. What you are going to get inside the app are a load of options, have a look:
- Trainers can now choose a Pokemon to be their buddy. A trainer will now earn a candy for walking for their buddy Pokemon.
- Now its easier as Niantic claims to select Pokemon on the screen.
- The bug with the egg hatching without animation seems to be fixed as well
- You will see lesser lags and hang issues during switching networks
- Pokemon Go plus support and some text bugs fixed.
- Jailbroken iphones will not be able to play Pokemon Go
This seems really awesome after a long wait for a lot of Pokemon Go users who were having a tough time with Pokemon Go bugs.
We will add more tutorials for you to use these Pokemon Go updates to your advantage and tricks that you can use to play and catch Pokemons better. Also we have some free gems for you to use so do subscribe to our blog.
To add to the fun of playing Pokemon Go, we have a messenger app for you guys which you can use to talk to other trainers around you and get notified whenever you are near a Poke Gym or Poke stop.