[GUIDE] 101 Java Essentials - Data Structures - Java for Android App Development

The key to building great applications is handling data efficiently so lets get started !
What is data ?
Data is any peice of fact,value say a phone number, name social security number etc.
Lets say your code is a calculator the numbers you punch in is data.
wiki def : Data is raw or unprocessed information.
Data Management
Though its a very broad term but By Data management here we would imply storing data in an efficient way so as to consume least amount of system resources and obtain a gain in performance.
Data Structures :
* Arrays
i plan to write this guide BIT by BIT everyday whenever i get free time so please be patient till its done.Sorry for delays really busy now a days .
Sent from my GT-S5302 using Tapatalk 2

Related

HD 2 For Forex

hello guys,
since i had bought hd2 i've searched lots of websites to optimize my htc for the usage for making operations in forex markets. if there are some people who are interested in this financial market, which tools are used by themselves can you share with us?
Metatrader mobile is excellent on the big screen of the HD2. Check it out...
Is that as in Castlemaine Forex?
of course metatrade mobile is the first app that should be installed but in addition to this especially to follow markets real time, which apps or methods do you use ? for example one of my reasons to be envious about iphone is dukascopy application which also enables following TV channel of Dukascopy and real time information.
for me reaching news in real time is most important, if i follow rss feeds these are not too useful for real time and twitter also and it gives us maximum 5 minutes for updating.
what are your methods? from which sources do you get benefit?
I don't follow news when mobile. As I mostly rely on technical analysis, I only need to have access to charts and a select number of indicators. This is provided by Metatrader mobile.
Mostly, I try to enter positions from my computer, where I have full access to data, custom indicators etc. The mobile is used to follow up the position, modify the stop loss / take profit and close positions.
Metatrader mobile uses a lot of resourses. The fact that HD2 has a fast processor and lots of memory makes running metatrader quite feasible. The large screen allows to have a clearer view of the market (compared to previous WM phones), especially in Landscape mode.
The question is whether MT4 mobile will be supported out of the box in WM7...
Interestingly enough, Oanda recently came out with an application for the iPhone. Plus many brokers are introducing MT4 applications for the iPhone, eg. FXPro.

Deployment Decisions

Well, after a lot of hours of work, I'm real close to putting my first app out.
It includes a 5MB database that can't be loaded from /assets due to it's size. The app itself is small.
Now, as I know it, there are 2 deployment methods:
1. Google Market
2. My own hosted site
Google Market is easy on end user...find an app, install (and pay if req'd). Works over 3g and WiFi. Gives you 24 hours to uninstall before you're credit card is charged. Drawbacks are one-time $100 vendor fee and 20% fee per download. Plus, as my apps may grow, the databases I use could get fairly large. Now, most phones can handle the size (my Droid goes to 40 gig with 32 gig SD card), but searching a huge database on the phone could lag like crazy.
A self-hosted site can be had for $50 a year from GoDaddy or 1 and 1 with FTP, MySQL databases and much, much more. With the SQL running on a hosted server, queries would be fast. Drawbacks are the user has to download Google ADB package, app and database. Then hook-up phone via USB, set a couple of settings on the phone and actually run the "adp install <package name>". Then you need some type of payment center (Paypal) and possibly a refund policy.
So, I'm on the fence here...comments and suggestions appreciated!
From what I've read, lagging for loading databases can be brought to a minimum by altering the way it loads. Instead of loading all the content up front (possibly with a dialog to keep the user amused while waiting) or by loading it as the information comes in. The listView might lag because of the phone's memory available as opposed to a problem with the app. It could be the app. If it needs resources, then make it a top priority and allow it to tell the OS to kill other resource-hogging applications to make way for the information download. It's just a speculation. I don't know this for sure, but I would check the Android Dev site and other places for more information.
Interesting idea...I could just set the data (about 80,000 rows) up as a flat file and then do an INSERT based on user input. Do query, return results and delete rows from table. That takes it to, on average, about a 2,000 row table.
Not sure how I can encapsulate (hide) the data from prying eyes or worse yet, changes to the data! But I will research that idea further and do some code changes and testing....thank you very much
I decided to get a hosted site for a couple of reasons:
1. To get my OWN MySQL databases
2. To create a web site to drive my business and apps delivery
I've finished my application and it works great. 80,000 row database on server, app is 40kb on the phone. Data retrieval is fast...i can get over 100 rows back in 2 seconds on 3G; WiFi would be even faster.
I've decided to push my apps to users via the web site. I'll offer a crippled demo version for review before they buy...no return policy. That is, if you like the demo and buy it, well, you made the choice LOL
I'm still not warm and fuzzy about making user download adb package, hook-up phone via usb and install. But I'll offer something I don't see much on Google Market and that is: SUPPORT. Each app I create will have it's own e-mail address for comments, concerns, enhancements and, god forbid, bug reports. I'll probably also offer free updates if I change the program or upgrade the database.
Well, time to go do the web site. I'll admit I would rather be coding vs. web site design!
Why not both? You could use google and it's HUGE base of users (which may never even know about your app otherwise) and still host the database online at your site. Note that many (most) phones are crippled by the carrier to NOT allow downloads from anything but the market.
Frankly, I think you could probably do it more efficiently. I don't know the details, but why not have the app download the database from your site upon first usage and store it to SD card? A local copy even on an SD card will be orders of magnitude faster than any online solution.
Yeah, I'm still 50/50 on it.
Speed is not an issue on this app; max rows I pull back may be 60 and it takes 2 seconds. Literally, by the time your finger is off the "Search" button, you have your data And if you think about it, how many databases are out there already that people are hitting off of web pages? My 2 second download was on 3G, I imagine the WiFi to be even faster (just tested it on WiFi...3G was faster LOL)
I like the control of the database on my end and it keeps the user from having to download a new copy if the database is updated.
And I'm trying to look at the big picture here too. I'm an unemployed programmer after a 13 year career. I don't mind coding apps for "the people", but I want to get my foot in the door of business' that are going to need smart apps, just like they all needed a web page years ago.
I just have to do some more research and make a decision. However, I do think you are right; the market has huge exposure and can even lead people to my site. The hosted sites is dirt cheap...$50 a year.
I know my app is pretty solid, just hate to think about paying that one-time vendor fee and the 20% per download. Then again, that takes ALL the billing concerns from me; the market handles it all.
Thanks for your feedback!

Is Possible To Store A Large Amount of Data Locally?

I'm planning to create an android application library system for the school, the school already have this kind of system that is accessible on the intranet(they will be soon implementing the online version). But before proceeding on the development on this project, I have come up with this following questions:
First, I'm planning to have my application to have the online and offline version, the online version is self explanatory, the offline version is to have the data(books etc.) searchable even without internet connection, What I think I'm going to do is to copy all the data from the web server and store it on the local database of the device(or this idea is wrong?). The problem is I don't know if the device can handle that large amount of data.
Second, if the above is possible, how can I make the application fetch the newly added data(the data that is added when the user is not connected to the internet) when the user has somewhat find an internet connection.
This problem is bothering me for many days already, hope you can help me with this one with your knowledge and ideas.
For the first part i can say if the particular device has got enough free space, it can of course handle that amount. I mean look at all those games that have to additionally download 1 or more gigs of data. Well i dont know what amounts you would be talking about but there shouldnt be a problem
---------------------------------
Phone : Nexus 4
OS :
- KitKat 4.4.4 stock
- Xposed: 58(app_process); 54(bridge)
- SU: SuperSU
- no custom recovery
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
clonedaccnt said:
I'm planning to create an android application library system for the school, the school already have this kind of system that is accessible on the intranet(they will be soon implementing the online version). But before proceeding on the development on this project, I have come up with this following questions:
First, I'm planning to have my application to have the online and offline version, the online version is self explanatory, the offline version is to have the data(books etc.) searchable even without internet connection, What I think I'm going to do is to copy all the data from the web server and store it on the local database of the device(or this idea is wrong?). The problem is I don't know if the device can handle that large amount of data.
Second, if the above is possible, how can I make the application fetch the newly added data(the data that is added when the user is not connected to the internet) when the user has somewhat find an internet connection.
This problem is bothering me for many days already, hope you can help me with this one with your knowledge and ideas.
Click to expand...
Click to collapse
Your idea is correct and entirely feasible. You should use a local SQLite database to store information retrieved from the web server using JSON. I wouldn't worry about the space too much, SQLite databases are very compact, I have one for my schools app that has I think around 600-700 entries and it comes in at around 400KB so it shouldn't be an issue.
Thank you all for the comments.

How to not list an app mobile data usage on Android Data Usage list.

Hi Guys,
I am trying to get Android not to track data usage of an specif app, but the only option I could found was to shut down app data usage at all.
But I dont want that, I just want that android do not consider this app's data usage in the total count.
This happens because my carrier offers me some free data usage on certain apps (whatsapp and deezer), so I dont want them to be on the systems data usage statistics...
Is it possible?
ps: I know I can probably download an data control app to get this like I want, but I wanted to keep using Android native data control.
Thank very much!

Best libraries/practices for native/cross-platform apps with DB backend

Hi, .
I am trying to figure out the best approach for an upcoming big project. Except doing small projects for Android (no web backend), most of my experience is with java, C++, and drupal programming.
The app I am looking at involves storing location for each user and a bunch of user data.
The app then needs to visualise/sort based on the nearby users on the map.
I've been reading up on current mobile technologies, which brought me to phonegap and drupalgap, although I am slightly afraid of being overly complex, and the delay of js rendering.
So I am also considering using a simpler restful service for login and user data storage (any recommendations? Do I build this myself?) and just building 2 native apps that communicate with this.
Drupalgap seems overly complicated to me and doesn't offer a good UI (would I use intelliJ and then just build a simple site in Drupal that is being rendered?). Or using the rest full services by hand (without phonegap) to do it native, as described at varunity.github.io/Drupal-Services-Android-App. Maybe there are libraries for this?
Sorry for the many questions, I just want to save myself time and do it right from the beginning. I am still very much in the process of reading up on existing libraries.
Thanks,
Do

Categories

Resources