[Q]New to the forums, and Android developement - Java for Android App Development

Good afternoon everyone! I have been looking for a forum to hit up that isn't stack-overflow for android developing and a friend pointed me here. Currently my experience with android is very minimal, I am working on a simple (simple is read, "Dear god what did I get myself into") project for school with no background in this sort of platform. I program in PHP and C# primarily and thought that this project would be a fun way to immerse myself in Android.
The application I am writing is a sort of life style app to gather daily eating habits from the user in an attempt to make you feel bad about your terrible eating choices and get you to eat better. If anyone is familiar with Good Eats I am basing the app around Alton Brown's 4 list diet.
Here is where the issues have started:
I constantly feel like I am coding myself into a corner and have started over a number of times, there seem to be many ways of gathering this information from the user but non of which seem very cut and dry with database interactions.
What I am looking for is a way to gather the day and list choices from a user (for the lists I was using dialog check boxes spawned from buttons but this doesn't seem to be the best way to do it as I cannot figure out how to store the checked off boxes within the dialog).
So my noob question is, are there any tutorials dealing with basic data gathering and storage?
Thanks for your time and look forward to hanging out on these forums more regularly.

ZachM86 said:
So my noob question is, are there any tutorials dealing with basic data gathering and storage?
Click to expand...
Click to collapse
Try this link -- developer.android.com/training/basics/data-storage/index.html

ZachM86 said:
Here is where the issues have started:
I constantly feel like I am coding myself into a corner and have started over a number of times, there seem to be many ways of gathering this information from the user but non of which seem very cut and dry with database interactions.
What I am looking for is a way to gather the day and list choices from a user (for the lists I was using dialog check boxes spawned from buttons but this doesn't seem to be the best way to do it as I cannot figure out how to store the checked off boxes within the dialog).
Click to expand...
Click to collapse
this may help:
create variables for each checkbox that can be checked
in your dialog interface onClick if (isChecked) { variable = 'which';}
then enter it into your database when submitted. Then when you query just correlate the variable to the corresponding string name
this may help as well (go down to the multi/single choice list)
http://developer.android.com/guide/topics/ui/dialogs.html

Related

[Q] APP IDEA for College Students

Hello everyone, I had an idea for an application that I am pretty sure has not been developed.
Would it be possible to develop an application that automatically alerts students when a college class is open or closed? I guess I am just looking for an app that automatically checks the desired class every hour or so and when there is a spot available it alerts the student (maybe even automatically sign the student up?).
Any ideas?
The greatest challenge with this kind of application is actually having the college use it for their classes, nothing impossible though
An app like that would need to interface into the school's system for optimum efficiency.
You might be able to do a web based setup that would 'learn' the schools format for passing data back and forth, and poll until a 'seats available' column changed, but it'd be messy.
You would probably be better off finding someone create one specific for your school. It's a great idea but unfortunately, schools probably are not using the same online services to handle their registration process, etc.
You could work this out in 2 different ways:
1. The Hard One: Make the time scheme from your schools website sync with the time scheme you use in your app, this would be incredebly hard to do, and i'm an IT student and I already know this that this is inpossible at my school.
2. The Easy One: Make a time scheme that you can fill in by yourself and an alarm will go off everytime a new class starts
Thanks for the posts guys. That makes sense, I understand why that would be difficult. That it too bad though, it would be such a useful app! I bet a lot of people would pay money for it.

Protecting Privacy - Compiling TaintDroid into Kernel to find leaky apps

Most people don't yet know that many Android software leak all sorts of information to the internet with only scant user acknowledgement (basically what you accept when you install the app).
Due to this and the fact that there are already privacy information harvesting apps for Android on the marketplace - a team of security experts have created TaintDroid:
What is TaintDroid?
From the project's web page: "A realtime monitoring service called TaintDroid that precisely analyses how private information is obtained and released by applications "downloaded" to consumer phones."
From: http://appanalysis.org/index.html
How can I install TaintDroid?
As TaintDroid is currently compiled into the kernel, you cannot easily install it, but you have to cook your own kernel. Instructions (for Nexus 1) are available at the project web site: http://appanalysis.org/download.html
How does TaintDroid work?
Here's a video demonstrating how TaintDroid works once it is installed and configured:
http://appanalysis.org/demo/index.html
Why would you want to install this?
There can be many reasons for installint TaintDroid:
- You want to learn about privacy features and play with Android kernel
- As it is currently impossible to differentiate between innocent and sneaky Android apps based only on what access rights they request, you may want to dig in deeper
- You are worried about what apps are doing behind your back and you want to know which apps to uninstall
- You want to help create Android a more secure and privacy-protected platform, instead of the swiss cheese it currently is
What can you do?
As compiling kernels is mostly beyond the reach of mere mortals currently, consider cooking TaintDroid into your kernel, if you are cooking one yourself and offering it available for others to try and use.
Hopefully increased awareness and usage will bring this program eventually into other modders and perhaps even Google's attention and something more easily accessible is offered for the public at large.
BTW, I'm just a user, interested in getting TaintDroid on my own Galaxy S. I'm not affiliated with the research program, but I like what they are doing. This information is purely FYI.
+1 for the idea
Sent from my GT-I9000 using XDA App
+1
Since we cannot expect information gatherer Google to come up with a good privacy protection mechanism soon I think we are forced to take measures ourselves.
I also learned that several of my bought applications are constantly forcing me to enable synchronisation and/or 3G internet. They either randomly uninstall (Asphalt 5), their icons disappear (for example: Mini-squadron) or won't start, with (Schredder Chess) or without a message. Angry Birds Beta2 lite (free game) and Hungry Shark are 2 more examples. So much for an incentive to buy games...
It would be great if applications used a well-defined mechanism to check their validity on-line, and not have this sneaky, lingering attack from all sides to any privacy or battery consumption aware user.
I can not cook Kernels, but this is something i want to use.
Not that i am worried, but i dont know what apps are sending when you open them. Thats something i want to know!
I am sure i am not the only one.
+1
Yes please... This should be in all android phones... as a security option you could turn on!!!
Antonyjeweet said:
Not that i am worried, but i dont know what apps are sending when you open them. Thats something i want to know!
Click to expand...
Click to collapse
And do some of these applications only send stuff when you open them?
--
From a user perspective it currently is really difficult to judge applications that need to start at boot-up and deal with many facets of your computer (Launchers, tools combining lots of divers features).
Do you know some ROM where Taindroid is included?
I've posted in hardcore and laststufo kernel threads to ask if they could add it.
We just need more people wanting it so they think about adding it
exadeci said:
I've posted in hardcore and laststufo kernel threads to ask if they could add it.
We just need more people wanting it so they think about adding it
Click to expand...
Click to collapse
glad you did that
+1 support the idea. hope some of our hardworking kernel builders will add this in.
My concern is how much another real time service will affect battery life. For people trying to make the leanest, fastest kernel I'm not sure it's viable.
I have been wanting TaintDroid built into android by default since the day it was announced, but I really do not think google cares about this, so please, please ROM cookers out there (Maybe Doc?), lets add this into our galaxy S roms.
Well, this seems to work only on android 2.1
Make it so.
+1
Combined with walldroid (or other firewall) this could put back power into users hands. Would really love to see this inside hardcores kernel. Maybe as an option for the stable releases?
+1
This should be the next standard in aAndroid
idea about spoofidroid application
how about a program to spoof or make the phone send fake:
GPS location,
IMEI,
phone number,
simcard id,
etc... information to applications that ask without permission.
this way you can feed these application with information they want but without breaking your privacy. (both end sides are more than happy)
-----
nice option to have:
1) enable/disable auto generate different id every time.
2) allow list / ban list of application to have real or fake id.
3) enable/disable notify for application request.
-----
there are all ready applications that fake your simcard PLMN mobile network codes without the need of kernel rights, but you need to enable disable the flight mode to restore the default code.
===========
good luck to spoofidroid or similar applications.
Jumba said:
My concern is how much another real time service will affect battery life. For people trying to make the leanest, fastest kernel I'm not sure it's viable.
Click to expand...
Click to collapse
I hope there will be developers out there who prioritize privacy/security over speed/battery and storage usage.
I'm the project lead of the TaintDroid system. We are currently working on a few extensions of TaintDroid but unfortunately are short on engineering resources to port TaintDroid onto other systems than Nexus One that we originally developed. We'd greatly appreciate it if XDA developers would take on this effort! Many ongoing projects would hugely benefit from having easy-to-run TaintDroid ROM available for many different devices and upcoming Android systems let alone user benifit.
Thanks,
Jaeyeon
Research Scientist @ Intel Labs Seattle
Ettepetje said:
I also learned that several of my bought applications are constantly forcing me to enable synchronisation and/or 3G internet. They either randomly uninstall (Asphalt 5), their icons disappear (for example: Mini-squadron) or won't start, with (Schredder Chess) or without a message. Angry Birds Beta2 lite (free game) and Hungry Shark are 2 more examples. So much for an incentive to buy games...
Click to expand...
Click to collapse
beta2 lite? i think that was malware, make sure it came from rovio otherwise it's fake and you should delete it.
It's really scary to see with the lookout app how many apps can access to your imei, telephone number "Read Identity Info", can access your contacts, track your position, and can send out all this data.
Here a HTC Desire user, asking for some privacy.
Best regards!

Kick ass apps wanted

Need an apk that signs my update.zip files from titanium blackup.
I don't understand why it hasn't been done. The code to do it is already in java! Search the forums for testsign.jar
I know everything you need to do to get it done but I don't have a development environment at my disposal. Help me out and I'll show you how to convert your jarred up code libraries to run on android!
Please and Thank You.
* edit - this question has been solved by brainmaster! ZipSigner if you find this application helpful please thank him below.
- Posted via mobile
New application proposal: ZeroNetAccess (ZeNA?)
Concept: an app that can block other apps network access.
Market alternative: DroidWall (root only, low market potential)
Methods: Maybe by modifying the apk manifest and resigning? Im not sure if there is a framework you could subclass for this.
Why: i turned off stats reporting for an app and i saw it writing reports to the web from logcat. Google took our rights away by not letting us do this from the application settings. Its my device and i have to pay the bill not google or the rude ppl who made the app. I will never understand why we were not given the right to administer mobile data access rights.
Potential: highly lucrative. People want to save money nowadays. In that respect voiding phone warranty for root access may not sit well with potential customer.
- Posted via mobile
Avid Droidery said:
New application proposal: ZeroNetAccess (ZeNA?)
Concept: an app that can block other apps network access.
Methods: Maybe by modifying the apk manifest and resigning? Im not sure if there is a framework you could subclass for this.
Why: i turned off stats reporting for an app and i saw it writing reports to the web from logcat. Google took our rights away by not letting us do this from the application settings. Its my device and i have to pay the bill not google or the rude ppl who made the app. I will never understand why we were not given the right to administer mobile data access rights.
Potential: highly lucrative. People want to save money nowadays.
- Posted via mobile
Click to expand...
Click to collapse
For rooted devices try DroidWall
Application Proposal: Web Page to PDF/HTML Safari Plug-In
Concept: Seriously?
Why: Cant save pages from the browser I safari always reloads the page when you come back to it from other activities (pointless nethog!) whats the friggin cache for anyway? It is better to save an article copy that you could view on the computer later or add to your info library if you write books or do any kinda technical research than it is to save a bookmark that may become 404 not found. Researchers nightmare!
Methods: execute shell command wget on page source. Use regular expression to get media list. Build directory tree. For each media call wget. Done.
Potential: medium. Not many people are so technically inclined.
Usefulness: extremely high, especially with zip/+email caps.. Roundabout source code viewer for nosy/curious folks.
Average potential, stream lehigh usefulness I would sell for a buck 99. Free (1 ad per saved page, no zip email)
- Posted via mobile
3rdstring said:
For rooted devices try DroidWall
Click to expand...
Click to collapse
Thank you! Will do!
- Posted via mobile
Application proposal: WarBastard
Concept: wardriving app featuring google my maps! Maps are shared globally by locale. Signals can be pinpointed by triangulation through cross reference of mac address, signal strength and previously detected locations in a global locale based database. While we are at, throw in a google navigation intent, and a compass with distance to closest accesible AP! Dont stop there! I wonder where that cell tower is located?
Purpose: to aid weary travellers and cheap bastards to connect with their loved ones and services over open networks. Services could also be used for cellular network signal diagnostics across hundreds of thousands of devices.
Potential: astronomical I would pay 5 bux. Better yet 12 bucks per year. Free (1 ad per download of database, 1 ad per connect to AP. Possibly integrated with APs for increased revenue potential across the board.) The map data can also be used to find good places to set up an advertising AP 4 even more potential earnings.
Anybody wanna pay me to sit around and do this all day? Lol.
SERIOUSLY you are looking at my qualifications. Asking 50k p. yr. to start Project Mgr./Analyst/Sr. Developer. consulting options available. Willing to relocate. Pm for inquiries/proposals.
- Posted via mobile
Avid Droidery said:
Need an apk that signs my update.zip files from titanium blackup.
I don't understand why it hasn't been done. The code to do it is already in java! Search the forums for testsign.jar
I know everything you need to do to get it done but I don't have a development environment at my disposal. Help me out and I'll show you how to convert your jarred up code libraries to run on android!
Please and Thank You.
- Posted via mobile
Click to expand...
Click to collapse
You should use the search function: ZipSigner.
It implements in the Titanium Backup and signs it on your wish.
brainmaster said:
You should use the search function
Click to expand...
Click to collapse
You are correct. I should never have assumed that this wasn't already in the market. Actually I didn't really plan to use this to sign titanium backups. For my purpose however the concept is the same.
* edit Human beings arent the fastest search engine but collectively we are the most accurate information sources on the planet. feel free to quote me on this
I thought that it would be better to ask someone who might know than it would be to search for something that may not exist. If I had access to a computer I would have no questions to post. Only answers! Being that I am stuck on my android for the time being, I appreciate all the help I can get!
Thank you for providing me with another helpful for resource!
* Edit: Dear brainmaster, words cannot express my level of gratitude! I am truly overjoyed by the passing of this shortcoming. Signapktic is exactly what I was looking for and I never would have found this application had it not been for your assistance. The topic of this thread is kick ass apps wanted. Even though this is an application that no longer needs to be developed (because real developers don't reinvent the wheel unless absolutely necessary,) you have met or exceeded the topic issue with flying colors!
- Posted via mobile
New application proposal: Launchpad Homescreen Widget
Concept: a widget that will pop up an on screen menu (complete with icons) onClick similar to pc desktop start menus. Customizable shortcuts Horizontal or vertical (and scrollable) layouts by preference and Customizable folders.
Why: I would rather have a feature like this than an app drawer any day. This would allow individuals to organize launcher short cuts by task. It would also be great if it were possible to open files in the system such as pdf, video, music or text files with appropriate application. Another great feature would be the ability to launch shell scripts. I have searched the market and nothing like this was found.
Potential: high. will save customer time allow them to become more visually organized and task oriented as well as adding more visual appeal to the home screens. $5.99 I would buy it! Time limited trial only.
- Posted via mobile

[Q] I'm making a game requiring loading in and searching a large dictionary of words.

Okay, so recently I made a program as part of a course in Java, using Swing, that gave you a prefix and prompted you to come up with as many words using that prefix as you could. To accomplish this, I had it use the dictionary used by Words With Friends (I might switch to a different dictionary like ENABLE, not sure yet), but that's what I've been using so far. I wanted to turn this idea into an Android application, because it seemed challenging enough to be fun, yet not too challenging.
The problem here is, the amount of time it takes a computer to load in an entire dictionary into an array of Strings of 173,139 words delimited by newlines in a .txt file is very small. The amount of time it takes to do the same in Android is slower, not to mention the fact that it needs to do this every time it starts up if I want to keep using the array.
I still wanted to make the app, so initially my idea was to do the array thing but use AsyncTask to show a loadscreen and use binary search to optimize the searching for the word in the dictionary every time the user hits a "Submit" button. This proved to be overly difficult (this is my first real Android app besides "Hello World" and a button that opened a "Hello World"...) and still quite slow.
After some searching, I decided what I really should do is make a database and have it search the database for the word when the user hits "Submit". I'm still going to use AsyncTask for downloading the database (I'd rather not bundle it with the .APK for fear of bloating it) and possibly for checking for the word in the database, depending on how fast the searching of the database ends up going.
Is this the best possible way I could go about doing this? Is there something that could give me better, faster results? From what I've seen, the database seems to be the easiest way to make sure I don't have to load in the list of words each time, but will searching the database be fast enough to appear responsive when a user wants to submit a word and see whether they got it?
I'm about to begin coding it using the database technique, but I thought I'd put this out there in case there's a better way I can accomplish this.
tl;dr: what's the quickest/best way to load in and constantly search a large (173,139 words) dictionary I have?
Thanks!
import antigravity said:
Okay, so recently I made a program as part of a course in Java, using Swing, that gave you a prefix and prompted you to come up with as many words using that prefix as you could. To accomplish this, I had it use the dictionary used by Words With Friends (I might switch to a different dictionary like ENABLE, not sure yet), but that's what I've been using so far. I wanted to turn this idea into an Android application, because it seemed challenging enough to be fun, yet not too challenging.
The problem here is, the amount of time it takes a computer to load in an entire dictionary into an array of Strings of 173,139 words delimited by newlines in a .txt file is very small. The amount of time it takes to do the same in Android is slower, not to mention the fact that it needs to do this every time it starts up if I want to keep using the array.
I still wanted to make the app, so initially my idea was to do the array thing but use AsyncTask to show a loadscreen and use binary search to optimize the searching for the word in the dictionary every time the user hits a "Submit" button. This proved to be overly difficult (this is my first real Android app besides "Hello World" and a button that opened a "Hello World"...) and still quite slow.
After some searching, I decided what I really should do is make a database and have it search the database for the word when the user hits "Submit". I'm still going to use AsyncTask for downloading the database (I'd rather not bundle it with the .APK for fear of bloating it) and possibly for checking for the word in the database, depending on how fast the searching of the database ends up going.
Is this the best possible way I could go about doing this? Is there something that could give me better, faster results? From what I've seen, the database seems to be the easiest way to make sure I don't have to load in the list of words each time, but will searching the database be fast enough to appear responsive when a user wants to submit a word and see whether they got it?
I'm about to begin coding it using the database technique, but I thought I'd put this out there in case there's a better way I can accomplish this.
tl;dr: what's the quickest/best way to load in and constantly search a large (173,139 words) dictionary I have?
Thanks!
Click to expand...
Click to collapse
In my opinion, your best option, especially if you plan on using larger dictionaries over time, would be to have the actual computing done on a server which returns the array in a JSON object that you retrieve from your app.

Store Item Finder / Item Locator

I'm trying to build an app for a school project that will locate items in a grocery store. For example, if I type in "orange juice" into the app, it will create a marker on a floorplan of the store. In this way I want to be able to populate a map with markers that correspond to items in a grocery list. Users can then walk around the store and swipe off markers as they pick up the items.
Does anyone know how I could do this? Are there any open source Android apps currently out there I could look at?
I feel like this would be a fairly simple project involving just uploading a .jpeg into an app and assigning coordinates to classes of items, like "juice" to {20,30} or something like that, but I have very little programming experience and am lost as to how to start.
bump
Well, people normally do not get an answer if they ask how to do the whole app.
So try to find the solution yourself and ask the community if you've got more specific questions/problems.
nikwen said:
Well, people normally do not get an answer if they ask how to do the whole app.
So try to find the solution yourself and ask the community if you've got more specific questions/problems.
Click to expand...
Click to collapse
Yeah I realize that I'm not going to get a step by step process... but I was just asking for general advice. Somebody suggested I use a .shp file and use an overlay with all the markers corresponding to the items, then create a pop up marker event for every time the user selects an item, which was helpful.
I'm looking for general ideas on implementation, that's all.
justinyeh said:
Yeah I realize that I'm not going to get a step by step process... but I was just asking for general advice. Somebody suggested I use a .shp file and use an overlay with all the markers corresponding to the items, then create a pop up marker event for every time the user selects an item, which was helpful.
I'm looking for general ideas on implementation, that's all.
Click to expand...
Click to collapse
You could save the name and the coordinates to files using JSON which can easily be written manually.
Have a look at Google's gson library.

Categories

Resources