|
What is Android? Google’s quirky, beautiful, mobile operating system. Initial Setup
Learning Android
Distributing Applications
Android development/design blogs
Useful(?) Tools, libraries, apps, and links Note: use Gradle, please to find the correct invocation to bring most of the libraries into your project using Gradle
If you're wanting to play around with different libraries and controls check out the DevAppsDirect application. It provides a nice interface for downloading and running samples of many popular libraries. Open Source Projects Worth Checking Out
FAQ • I need more help. The documentation is poo poo and Android is whack. Can’t I just talk to the Android team directly so they can fix my broken code? Sure! Add Android Developers to your circles on Google+. They typically hold developer office hours via Hangout on Wednesdays at 2pm Pacific (UTC-7). It’s pretty awesome, it’s not improbable to get your question about doing something crazy in ListView answered by Romain Guy in one of these. The Google TV team does this as well, but at 1pm Pacific. • I love the animation used in the ICS launcher but I’m not sure how to reproduce it, how can I do that without hassling someone else? One of the great things about Android is that the OS is open source. If you fancy using something you see in the OS in your own application but it isn’t available directly through the Android API check out the AOSP directly and modify the code to your needs. • I prefer brainfuck and MUMPS to Java, isn’t there another language I can use for Android applications? I think so! Besides using the NDK (which probably isn’t a good idea to use unless you’re writing a game or something) some developers have been using Scala with success. I’m not one of them but perhaps someone with Scala+Android experience will be kind enough to post a trip report in this thread. • How do I add in-app purchases to my app? Check out the developer docs on In-App Billing. • Android is terrible, my app crashes whenever I change orientation - why!? Go back to Android Basic Training, specifically Managing The Activity Lifecycle - Recreating An Activity. The Android Documentation posted:Caution: Your activity will be destroyed and recreated each time the user rotates the screen. When the screen changes orientation, the system destroys and recreates the foreground activity because the screen configuration has changed and your activity might need to load alternative resources (such as the layout). How do I Gradle? • Forums member Uncomfortable Gaze gives a brief rundown on converting to Gradle What versions of Android should I support? • Good question. If your app is already out there you should be able to check your install breakdown via the Play Store Developer Console. Use that data to decide for yourself. My personal opinion? minSdkVersion=14 is upon us. Users who are still on 2.x probably aren't going to download and use apps anyway. Check the monthly OS version breakdown on the Android Developer Dashboard page. (Suggestions on updating/modifying this OP are welcome!) Glimm fucked around with this message at 01:37 on Feb 23, 2014 |
# ? Jun 18, 2012 03:31 |
|
|
# ? May 13, 2024 09:22 |
|
Does android support in-app purchases. Got a client who wants to know.
|
# ? Jun 18, 2012 06:11 |
|
duck monster posted:Does android support in-app purchases. Got a client who wants to know. http://developer.android.com/guide/market/billing/billing_overview.html Anyways, is there anyway to still use OpenFeint? I know it was bought out, but I can't find any tutorials or anything for GREE, and there seemed to be tons of info on OpenFeint. Suran37 fucked around with this message at 09:00 on Jun 18, 2012 |
# ? Jun 18, 2012 08:30 |
|
Late-night braindump (tell me if I should clean this up):duck monster posted:Does android support in-app purchases. Got a client who wants to know. http://developer.android.com/guide/market/billing/billing_overview.html Yes, and last time I looked into it (1+ years ago) it sucked. Maybe it's gotten better. Google is phasing out alternative forms of payment. Obviously, it's harder for Google to have a handle on it than Apple, but they plan - eventually - to pull the same my-way-or-the-highway poo poo that Apple did for mobile payments. So even if there is an alternative, you should factor that in - unless you're planning on releasing on an alternate platform, in which case YMMV. Glimm posted:What is Android? Glimm posted:Learning Android Newbie Android developers should consider that while there *may* a time and a place to violate the design patterns, if you don't know when, then that is not the time. Most of the time you're probably just going to end up with a crappy app. And while you might think you can just port your tablet layout to GoogleTV, remember that TVs don't have touchscreens, have up to 10% overscan on the edges, are navigated with the D-pad and not usually the mouse, and the option button is practically taboo. Glimm posted:Useful(?) Tools, Libraries, and links WARNING On some older devices, with enough injection bindings, RoboGuice may contribute noticeably to the startup time of the app. Use something like RoboSplashActivity if you're targeting old devices, more bindings will mean a longer startup, but old ones are seriously slow. Also note that constructor injection makes a lot less sense on Android, and that immutability and anything referencing a context needs to be handled with care. I would not use AndroidAnnotations in production code simply because it's too far off the beaten path that I anticipate debugging could be a bitch. IIRC, it uses annotations to transform the source. While it might seem nifty, I don't want to have to pretty fundamentally alter my code if there's a bug I can't locate or figure out how to fix. That said, I'm not actually aware of any reason the implementation is not sufficient. I haven't seen greenDAO before, but be careful when displaying large lists of objects backed by POJOs it's going to put some memory stress on your app, and it could hiccup. If you have a large set of data that maps well to SQLite, consider using a SimpleCursorAdapter. it will often be smoother than an ArrayAdapter will be. Miscellaneous:
Doctor w-rw-rw- fucked around with this message at 09:37 on Jun 18, 2012 |
# ? Jun 18, 2012 09:08 |
|
I am trying to figure out ActionBarSherlock for an app I am working on. I am currently trying to add a button that opens a new activity, I tried following the Action Provider sample, but I seem to be stuck on the intent. The sample opens the phone settings menu, and I have been struggling to try and modify it to open my activity. My code so far can be seen here: http://pastebin.com/cc4pN6qF If I leave it how it is, it displays the icon and opens the phone settings perfectly. If I try to move the intent after the constructor and change the intent to Intent(mContext, AddPilot.class) it doesn't show the icon, but it says "Add Pilot" which is the title I assigned to it, however it doesn't open the new activity it displays the toast "Handling in onOptionsItemSelected avoided." Maybe I am following the wrong sample, I don't know. Any help would be appreciated.
|
# ? Jun 21, 2012 09:50 |
|
Thank you for making this thread. I didn't realize there were so many resources for learning to develop for Android nowadays.
|
# ? Jun 21, 2012 17:16 |
|
Suran37 posted:I am trying to figure out ActionBarSherlock for an app I am working on. I am currently trying to add a button that opens a new activity, I tried following the Action Provider sample, but I seem to be stuck on the intent. The sample opens the phone settings menu, and I have been struggling to try and modify it to open my activity. My code so far can be seen here: http://pastebin.com/cc4pN6qF Any reason you're using an ActionProvider over a simple menu item? Are you familiar with how ICS actionbar or pre-ICS menus work? Glimm, you should add a link to Awful for Android's source to the OP. It's a good example of a modern Actionbar(sherlock) based app with tablet functionality. zeekner fucked around with this message at 04:52 on Jun 22, 2012 |
# ? Jun 22, 2012 04:50 |
|
Geekner posted:Glimm, you should add a link to Awful for Android's source to the OP. It's a good example of a modern Actionbar(sherlock) based app with tablet functionality. Done. Also, did anyone notice the developer.android.com redesign?
|
# ? Jun 23, 2012 03:04 |
|
Glimm posted:Done. Yes. It's horrible. Less readable.
|
# ? Jun 23, 2012 03:25 |
|
Doctor w-rw-rw- posted:Yes. It's horrible. Less readable. Odd, I find it easy on the eyes. What I really like is the ActionBar styling and the autocomplete in the search box, just looks pretty to me.
|
# ? Jun 23, 2012 04:16 |
|
Geekner posted:Any reason you're using an ActionProvider over a simple menu item? Are you familiar with how ICS actionbar or pre-ICS menus work? I'm not familiar with actionbars at all. I was looking through the ABS Demos app and ActionProvider seemed to be relevant, but I have figured out a solution now based on the Android ActionBar examples. Suran37 fucked around with this message at 04:47 on Jun 23, 2012 |
# ? Jun 23, 2012 04:38 |
|
Glimm posted:Odd, I find it easy on the eyes. What I really like is the ActionBar styling and the autocomplete in the search box, just looks pretty to me. It's easier on the eyes but I feel like that's part of the problem. I could scroll very quickly through the old documentation and know roughly where in the document I was just by the shape of the text. Now not only that's harder, but the links to other pages don't pop and so it's easy to miss. I hate how muted it looks now. And it's poo poo like this: that means that I can no longer code by dividing my screen in half, because why would I ever want to see the diagram and the code at the same time? They also got rid of the toggle that made the page stop complaining about your API version so that when you googled for something related to, say, fragments and it brought up the normal fragments, you could click it off and find what you were looking for anyways, because the API is the same as in the support library, then click it back on so you can browse the docs as usual for the rest of the API.
|
# ? Jun 23, 2012 06:47 |
|
It is 2012, get another monitor. You can get a real, 1440p IPS 27" for literally 300 bucks. There is no excuse.
|
# ? Jun 23, 2012 20:23 |
|
Sinestro posted:It is 2012, get another monitor. You can get a real, 1440p IPS 27" for literally 300 bucks. There is no excuse. I suffered from neck problems when I had two monitors. Totally went away when I switched to one huge monitor instead. (though that screenshot is from my laptop not my work computer)
|
# ? Jun 24, 2012 00:18 |
|
If anyone is interested in some swipe to dismiss example code Roman Nurik posted some on Google+ recently: https://plus.google.com/113735310430199015092/posts/Fgo1p5uWZLu Which Jake Wharton helpfully backported to utilize his Nine Old Androids (animation library): https://github.com/JakeWharton/SwipeToDismissNOA (I've updated the OP to include a link to the Nine Old Androids project)
|
# ? Jun 24, 2012 14:50 |
|
What is the least-ugly way of writing SQL for Android in Eclipse? Right now I'm putting each statement one-per-line in my strings.xml file like this:XML code:
(code stolen from here)
|
# ? Jun 25, 2012 20:29 |
|
Lutha Mahtin posted:What is the least-ugly way of writing SQL for Android in Eclipse? Right now I'm putting each statement one-per-line in my strings.xml file like this: You could put your .sql files in the assets directory and write a class to load your SQL from that. I implemented migrations that way.
|
# ? Jun 25, 2012 21:41 |
|
Hey dudes, I'm coming from an exclusively C# workplace and I'm having some XML issues. In .NET, XML that was formatted like a datatable was pretty easy to sort through, edit columns, add columns, edit rows, delete rows, add rows, etc. I can't find any nice easy-to-use class within the Android SDK. Is there anything I'm missing?
|
# ? Jun 27, 2012 17:56 |
|
New stuff for devs: On-device app encyrption. Smart app updates that only send out the part of the apps that have changed. Google Cloud Messaging which is C2DM on steroids.
|
# ? Jun 27, 2012 18:15 |
|
Thermopyle posted:New stuff for devs: To elaborate on this here is Google's dev page on 4.1: http://developer.android.com/about/versions/jelly-bean.html#google
|
# ? Jun 27, 2012 18:18 |
|
TheReverend posted:Hey dudes, I'm coming from an exclusively C# workplace and I'm having some XML issues. In .NET, XML that was formatted like a datatable was pretty easy to sort through, edit columns, add columns, edit rows, delete rows, add rows, etc. I've actually never had to work with xml on Android (the one time I had xml data it was a one-off and I just parsed it into json with a short Python script), so sorry not to have any great advice to give. But this article looks promising, have you checked it out? http://www.ibm.com/developerworks/opensource/library/x-android/
|
# ? Jun 27, 2012 18:20 |
|
Doctor w-rw-rw- posted:You could put your .sql files in the assets directory and write a class to load your SQL from that. Does this involve writing like, half of a SQL lexical scanner? In the book I'm reading, the methods used to pass statements to SQLite (e.g. execSQL(String sql)) accept one statement at a time, so since I want to write .sql files with nice indentation and whitespace it seems I'd need to have a more complex tokenization process than my current scheme of String.split("\n").
|
# ? Jun 27, 2012 18:27 |
|
Lutha Mahtin posted:Does this involve writing like, half of a SQL lexical scanner? In the book I'm reading, the methods used to pass statements to SQLite (e.g. execSQL(String sql)) accept one statement at a time, so since I want to write .sql files with nice indentation and whitespace it seems I'd need to have a more complex tokenization process than my current scheme of String.split("\n"). Quite possibly. I don't remember how exactly I solved this problem since it was about a year ago or so and it never made it into production. Having a sqlite database file rather than a list of queries to create the database might have been how I did it, but that doesn't lend itself to migrations, though I've always found it easier to just dump the database since I use it as a cache and people are jerks and wait for several versions before updating for no reason.
|
# ? Jun 27, 2012 20:03 |
|
Anyone used or have any comments about Crittercism? Looks like something along the lines of BugSense, but with more features. What has my interest piqued is that the feature list mention an in-app support forum for your apps...which sounds like a cool idea.
|
# ? Jun 28, 2012 01:54 |
|
Just curious, how are you guys dealing with this? 90% of devices are still below 3.0. Are we stuck using ActionBarSherlock and the compatibility library? It seems like I might as well pretend that Honeycomb/Ice Cream Sandwich/Jelly Bean don't even exist, if I'm pretty much forced to code against 2.3 anyway.
|
# ? Jun 28, 2012 11:45 |
|
NoDamage posted:Just curious, how are you guys dealing with this? 90% of devices are still below 3.0.
|
# ? Jun 28, 2012 12:01 |
|
NoDamage posted:Just curious, how are you guys dealing with this? 90% of devices are still below 3.0. ActionBarSherlock all the way. It is pretty seamless for the most part.
|
# ? Jun 28, 2012 12:38 |
|
We have an application that has a bunch of different activities reachable by a main menu. Pretty standard stuff. Our customer likes that for phones, but for the tablet version they want all of these unrelated activities jammed into the same page (yes I know this is dumb, its not up to me). I've been reading about fragments but this doesn't seem to be the typical use case for them... What I want is something like a group of iframes on a webpage, with all of the activities in a single group running together with no knowledge of each other. Whats the best way to accomplish this?
|
# ? Jun 28, 2012 12:41 |
|
Glimm posted:ActionBarSherlock all the way. It is pretty seamless for the most part.
|
# ? Jun 28, 2012 14:10 |
|
ADINSX posted:We have an application that has a bunch of different activities reachable by a main menu. Pretty standard stuff.
|
# ? Jun 28, 2012 14:11 |
|
NoDamage posted:Since ActionBarSherlock requires me to compile against Android 4.0 but I want to target 2.3, is there a way to have Eclipse tell me if I've accidentally used an API not available in 2.3? I seem to remember reading this was possible but can't find the source again. Android Lint should handle this, check the newAPI section here: http://tools.android.com/tips/lint-checks As long as you properly set your minSdk/targetSdk you should get warnings when you use newer APIs while supporting older versions, you can then use these warnings to ensure you're guarding against the older versions attempting to use those APIs.
|
# ? Jun 28, 2012 14:44 |
|
NoDamage posted:Since ActionBarSherlock requires me to compile against Android 4.0 but I want to target 2.3, is there a way to have Eclipse tell me if I've accidentally used an API not available in 2.3? I seem to remember reading this was possible but can't find the source again. ActionbarSherlock is great, but there is a big gotcha you need to watch out for: Whenever you have the Sherlock version of a class available, use it instead of the official android one. This'll bite you if your not careful. For example, you have to use Sherlock's Window.FLAG_XXX instead of the official android one, because their "Activity.addFlag()" function takes a long instead of an int (they couldn't override the method). Don't let that stop you, just watch your import list. Seriously, ActionbarSherlock makes a unified, compatible UI so much easier.
|
# ? Jun 28, 2012 19:36 |
|
Hey, I have a question about certificates. I am trying to parse some xml, but the site I read it from is HTTPS, so when I try to run it on the emulator I get an error saying, "Not trusted server certificate." Do I need to get their certificate and install it on users devices or what?
|
# ? Jun 29, 2012 00:53 |
|
Edit: Never mind, I think I fixed it.
UraniumAnchor fucked around with this message at 20:55 on Jun 29, 2012 |
# ? Jun 29, 2012 20:46 |
|
Thermopyle posted:Smart app updates that only send out the part of the apps that have changed.
|
# ? Jun 29, 2012 23:08 |
|
Scaevolus posted:They say it makes the average update 1/3 as large, but hopefully it's better for big apps where most updates are minor code changes. Yeah, that seems likely.
|
# ? Jun 30, 2012 00:06 |
|
NoDamage posted:Just curious, how are you guys dealing with this? 90% of devices are still below 3.0. This, by the way, is why we have so much trouble at work with android compared to IOS. For whatever reason (I suspect its the demographics of IOS buyers, as well as apples tighter control over the software delivery chain) the IOS adoption rate of new versions is extremely high. Something like 80%+ are now on IOS5 or the high end of IOS 4. That makes adopting apples funkier new technologies much easier to adopt in terms of making sure our software has an audience. But god drat it, we still have people complaining to us about not being able to use poo poo on there Android 1.x devices And its a shame. Most of the poo poo that made me hate android back when v2 was still a barely new thing has been resolved, more or less, except this one loving problem. Still it could be worse. Symbian
|
# ? Jun 30, 2012 04:07 |
|
duck monster posted:This, by the way, is why we have so much trouble at work with android compared to IOS. For whatever reason (I suspect its the demographics of IOS buyers, as well as apples tighter control over the software delivery chain) Most people just can't upgrade their devices to newer versions. The manufactuers haven't released updates for their devices. Like...Google just came out with Android 4.1. The great majority of devices on the market today will never even have the option of getting that update.
|
# ? Jun 30, 2012 16:43 |
|
Thermopyle posted:Most people just can't upgrade their devices to newer versions. The manufactuers haven't released updates for their devices. Like...Google just came out with Android 4.1. The great majority of devices on the market today will never even have the option of getting that update. Also, I wonder if people who can upgrade even know. I just found out my Droid RAZR has an update from 2.3.6 to 4.0.4 that has been available for over a week know and my phone never notified me. The only reason I knew was because I just randomly checked for an update, which is something I know most people probably never do.
|
# ? Jun 30, 2012 19:12 |
|
|
# ? May 13, 2024 09:22 |
|
One of my friends is not a technical person at all and had no idea that her phone had the option to update OTA from Froyo to Gingerbread. She didn't even know what Froyo or Gingerbread were. It's an ATT Samsung Infuse, some weird Galaxy S II thing with half the CPU cores and half the RAM, so it's not incredibly ancient. I would surprise if more than the small amount of people willing to stick to Nexus phones for software actually knew anything about their phone OSes other than "it's an Android".
|
# ? Jun 30, 2012 20:27 |