|
sort of moot, the legacy dev could've used the same keystore (don't do this. no really don't do this) for all his/her apps and not feel comfortable handing it over to someone new, in which case they might have no choice.
speng31b fucked around with this message at 19:06 on Feb 21, 2016 |
# ? Feb 21, 2016 19:01 |
|
|
# ? May 15, 2024 03:23 |
|
kitten smoothie posted:Which you'd need anyway if you wanted to push a final update to the old one that just says "new one is over here," so that should be moot. speng31b posted:sort of moot, the legacy dev could've used the same keystore (don't do this. no really don't do this) for all his/her apps and not feel comfortable handing it over to someone new, in which case they might have no choice.
|
# ? Feb 21, 2016 19:21 |
|
I've noticed something pretty weird happening with one of my personal apps, curious if anyone has any ideas. Yesterday it got a huge spike in daily active users, daily new users, etc, like more than 1000% increase. At first I thought it got featured somewhere or something, then I looked at the analytics and notice it's all coming from two device models, both running API 19, both oldish tablets: samsung SHW-M500W LGE LG-V480 Both register as unrooted (as far as Crashlytics root detection goes anyhow), and there are many concurrent installations going for each device model - so not just one device per model, lots of these devices. From the button click analytics, it looks like there's some fairly large number of these devices just roboting through my app since yesterday, clicking random buttons, doing random stuff, then uninstalling and reinstalling and doing it again. I don't get a Google Analytics referrer links for any of this stuff, so I'm guessing the APK was manually installed on some robot farm of these aging tablets which as I type this is happily smashing my app with random input. Not sure what the point of this is. Think maybe some automated testing service picked up my APK as a test case? speng31b fucked around with this message at 18:14 on Feb 22, 2016 |
# ? Feb 22, 2016 16:40 |
|
Someone running a fuzzer on a device farm comprised of cheap old crap they could get off eBay?
|
# ? Feb 22, 2016 18:35 |
|
Can someone confirm whether the NDK documentation is indeed completely out of date when it comes to building C++ code with the latest Android Studio? From my preliminary research it looks like what they describe (editing the Android.mk and Application.mk files to specify build settings) has been entirely replaced with options in build.gradle. Edit: It looks like NDK support in Android Studio is horrendously incomplete. Argh. Edit 2: Finally got everything to work (Java calling into C++ code that uses the standard library and links against a pre-built static library). What should have taken a few minutes with the proper documentation ended up taking an entire day to sort out. Had to upgrade to the experimental version of gradle to get support for static library dependencies, and then a lot of trial-and-error guessing at the new gradle syntax to get the compiler flags and dependencies specified correctly. I would do a writeup of how to get everything running but it's probably pointless cause it will likely change again soon. NoDamage fucked around with this message at 08:52 on Feb 24, 2016 |
# ? Feb 23, 2016 00:57 |
|
Using/learning android studio/programming for a class project. The android emulator is running very slow, and I have onboard graphics card (thinkpad). Will I be happier by purchasing some cheap android phone to plug in for testing, and if so what is recommended (I have an iphone til contract expires : )
|
# ? Feb 24, 2016 18:32 |
|
Thom ZombieForm posted:Using/learning android studio/programming for a class project. The android emulator is running very slow, and I have onboard graphics card (thinkpad). Will I be happier by purchasing some cheap android phone to plug in for testing, and if so what is recommended (I have an iphone til contract expires : ) Edit: You also need to be running the latest beta release of Android Studio 2.0 but it's perfectly usage and stable at this point, we all use it at work on production code. http://tools.android.com/tech-docs/emulator Tunga fucked around with this message at 18:53 on Feb 24, 2016 |
# ? Feb 24, 2016 18:50 |
|
I want to make an app where you can arrange shapes that snap onto one another at fixed points (like lego). It could be in 2d or isometric rather than 3d. Is it possible to do stuff like that through canvas or should I be looking at a game engine? I'm picturing the user dragging stuff into a drawing area from a toolbox.
|
# ? Feb 24, 2016 19:56 |
|
Tunga posted:Make sure you have the latest versions of everything in the SDK and that you're using the x86_64 images. The new emulator is fast and good. Yeah even without HAXM the new emulator is pretty okay, but keep in mind for someone using something without hardware virtualization support it's not going to be as fast and good as it might be for you. Emulators are neat, but my recommendation would be to test and develop on real devices as often as possible, for lots of reasons. Chas McGill posted:I want to make an app where you can arrange shapes that snap onto one another at fixed points (like lego). It could be in 2d or isometric rather than 3d. Is it possible to do stuff like that through canvas or should I be looking at a game engine? I'm picturing the user dragging stuff into a drawing area from a toolbox. I made this app: https://play.google.com/store/apps/details?id=com.ludomade.blueprint which is currently the most popular wireframing tool on the Play Store as far as I can tell. Its core mechanic is shape-snapping on a zoomable/scrollable grid. I used Canvas for the whole thing and it runs perfectly well as far back as Android 4.1 with basically zero crashes, and even runs pretty well on crappy tablets that most people had resigned to collecting dust in a corner. Using Canvas let me develop it quickly and iterate on it rapidly in response to user feedback - I considered a game engine when I conceived the idea, but I'm glad I didn't do that. In retrospect I couldn't have built it nearly as well or quickly or made it mesh as well with existing UI conventions if I'd used an engine. e: Earlier when I said basically zero crashes, I actually mean literally zero crashes as far back as Crashlytics goes with almost 50K installs - I'm pretty proud of that one, might as well drop it in there. speng31b fucked around with this message at 02:27 on Feb 25, 2016 |
# ? Feb 24, 2016 21:52 |
|
speng31b posted:I made this app: https://play.google.com/store/apps/details?id=com.ludomade.blueprint which is currently the most popular wireframing tool on the Play Store as far as I can tell. Its core mechanic is shape-snapping on a zoomable/scrollable grid. I used Canvas for the whole thing and it runs perfectly well as far back as Android 4.1 with basically zero crashes, and even runs pretty well on crappy tablets that most people had resigned to collecting dust in a corner. Using Canvas let me develop it quickly and iterate on it rapidly in response to user feedback - I considered a game engine when I conceived the idea, but I'm glad I didn't do that. In retrospect I couldn't have built it nearly as well or quickly or made it mesh as well with existing UI conventions if I'd used an engine. Looking at the canvas documentation now. I have so much to learn. I'm planning my final degree project and I'm teetering between actually coding an app or making a lovely 'high fidelity' prototype in something like AppInventor... Chas McGill fucked around with this message at 22:33 on Feb 24, 2016 |
# ? Feb 24, 2016 22:24 |
|
Hey guys, I've been going through the Big Nerd Ranch book and it's given me a massive amount of insight and I actually feel like I have some idea of what I'm doing now, which is great! I'm not sure if this is the right thread to ask, but I'm trying to create an Activity that asks the user to chose how they are feeling based on an emoji. After some research, I found that GridLayout seems to be best suited for what I want to do. Unfortunately, when I try to add a title at the top, it buggers my centre column up. On top of that, the padding for the images is kind of weird and I can't figure out why.XML code:
My thinking was that if I nested the GridLayout inside of the Relative Layout, I would be able to put a TextView nested before the GridLayout began, then I would be able to not bugger the column sizes up. Does anyone have any guidance on this? I've been loving with it for the last hour and a half edit: I read that there is a way to have content span across multiple columns, but I can't figure that one out either FAT32 SHAMER fucked around with this message at 06:37 on Feb 26, 2016 |
# ? Feb 26, 2016 06:30 |
|
I would make the GridLayout the child of a vertical LinearLayout and put a Toolbar above it to show the title. But I'm not an expert.
|
# ? Feb 26, 2016 06:38 |
|
fleshweasel posted:I would make the GridLayout the child of a vertical LinearLayout and put a Toolbar above it to show the title. But I'm not an expert. Doing this pushed the images to the top, which is good, but when I add the toolbar it makes the images disappear, which also happened when I tried using a RelativeLayout as the parent followed by a TextView before the GridLayout child. Also, semi-related question: for the images to be clickable, I assume you just add android:clickable="true" and android:onClick="emotion", yeah? Or is it more similar to how you make a TextView a link to a new activity? FAT32 SHAMER fucked around with this message at 07:09 on Feb 26, 2016 |
# ? Feb 26, 2016 07:07 |
|
Remember that a LinearLayout defaults to horizontal unless you specifically set the orientation property. And for RelativeLayout you have to use layout_below or similar to set up the relative layout of the children, were you doing that? Basically can you post the code that isn't working?
|
# ? Feb 26, 2016 11:48 |
|
Tunga posted:Remember that a LinearLayout defaults to horizontal unless you specifically set the orientation property. Nice! adding layout_below did the trick! Thanks 😊 edit: Here is what I have so far, for our senior project we wanted to build an app that allowed mental health patients to keep track of their moods among other things. I didn't pick any of the colours nor the logo, but I think it's turning out rather nicely. One weird thing to note is that the FeelingsActivity in the VM looks different from how the Android Studio Preview puts it https://www.youtube.com/watch?v=ZOxiJQ4-tOc versus I suspect it may be because I defined the TextView textSize="30p" but I'm not sure XML code:
FAT32 SHAMER fucked around with this message at 18:21 on Feb 26, 2016 |
# ? Feb 26, 2016 16:49 |
|
Text sizes should be set in SP, not DP. And remember that different devices will display things a little differently due to screen ratios density buckets, etc. That's the nature of Android and your layouts should be adaptable.
|
# ? Feb 26, 2016 18:43 |
|
Hey guys, I'm a newb android developer; I'm more of a web dev, but still a student so we have to develop an Android app for our senior design project at school. One of the parts of the project is documenting the architectural style. Here's where I need help. Our group is in agreement about Android being comparable to an MVC architecture. Where we disagree is where the line is between model and controller; I feel like the controller is an activity/fragment but that any "fat" business or algorithmic logic, as well as any data schema definition/ORM stuff should be considered the Model. One of my colleagues is pretty adamant that business logic and such should go in the controller/activity. There doesn't seem to be a cut and dry consensus, does anyone have any opinions? We're all terrible at android so we're kind of guessing at this point.
|
# ? Feb 26, 2016 19:03 |
|
Tunga posted:Text sizes should be set in SP, not DP. And remember that different devices will display things a little differently due to screen ratios density buckets, etc. That's the nature of Android and your layouts should be adaptable. Counterpoint, if you're going to be too lazy to test that your layouts don't break when your text resizes based on compatibility settings you should set them in DP and suppress the warning. Small text is better than text that you can't read at all because it's clipping outside the view. an skeleton posted:Hey guys, I'm a newb android developer; I'm more of a web dev, but still a student so we have to develop an Android app for our senior design project at school. Modern architecture has people treating Activities/Fragments more as views, keeping them lightweight, and putting presenter logic elsewhere. You don't put business logic in the model regardless. This has been linked a few times in the thread, just read it over and get informed, then see what you think: https://codelabs.developers.google.com/codelabs/android-testing/index.html?index=..%2F..%2Findex (I know it says testing, but just read it for the architecture stuff)
|
# ? Feb 26, 2016 19:13 |
|
speng31b posted:Counterpoint, if you're going to be too lazy to test that your layouts don't break when your text resizes based on compatibility settings you should set them in DP and suppress the warning. Small text is better than text that you can't read at all because it's clipping outside the view. speng31b posted:Modern architecture has people treating Activities/Fragments more as views, keeping them lightweight, and putting presenter logic elsewhere. You don't put business logic in the model regardless. This has been linked a few times in the thread, just read it over and get informed, then see what you think: https://codelabs.developers.google.com/codelabs/android-testing/index.html?index=..%2F..%2Findex (I know it says testing, but just read it for the architecture stuff)
|
# ? Feb 26, 2016 19:28 |
|
Tunga posted:Well, true, but better to learn to not write lovely inflexible layouts in the first place. Yeah for your general body copy this is true, it just helps to keep in mind that the purpose of SP is accessibility - so if it doesn't make your app more accessible to use SP, don't. This is often the case in real applications when designers use text essentially as glorified static imagery, in layouts where the design effect relies on text being a certain size relative to other text or the layout itself. There are plenty of apps live right now with all kinds of text that will happily scale with SP, but it does pretty much the opposite of making the app more usable. I'm glad the lint warning exists, because it forces developers to think about when SP makes sense, but lots of people have taken that to mean "slavishly use SP for all text even when it doesn't make sense." Don't do that.
|
# ? Feb 26, 2016 20:03 |
|
Okay here's a question: I've been developing our senior project Android App on OS X and the only other person that has been pulling/submitting/messing with it is also on OS X, however today one of our partners pulled then opened Android Studio and the committed the changes, and it hosed everything up to the point that I had to roll back to a previous commit is there a way to prevent this from happening so that the Windows users can work on the app with us or is this a totally different issue?
|
# ? Mar 2, 2016 19:54 |
|
Tusen Takk posted:Okay here's a question: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems For what it's worth, my project also ignores the .idea directory and all .iml files.
|
# ? Mar 2, 2016 20:02 |
|
If everyone is using Android Studio it really shouldn't matter what OS you're using unless you did some spectacularly bad with your .gitignore.
|
# ? Mar 2, 2016 20:17 |
|
Tough break, but you won't forget about the gitignore next time. https://github.com/github/gitignore bookmark it
|
# ? Mar 2, 2016 23:57 |
|
speng31b posted:Tough break, but you won't forget about the gitignore next time. Nice! Thanks Tunga posted:If everyone is using Android Studio it really shouldn't matter what OS you're using unless you did some spectacularly bad with your .gitignore. I went over the commits and it looks like it changed the SDK and gradle file locations because on mac its in a different part than windows or something
|
# ? Mar 3, 2016 01:15 |
|
You shouldn't be committing files that have paths outside of your repository. Remove them and add them to your gitignore file.
|
# ? Mar 3, 2016 02:32 |
|
i have to do android project. Coming from IOS this makes me sad. Is it any easier to do on windows v.s OSX? I don't care which OS I use. I just want the path of least resistance. Also, I started android studio, set my target to API 19 but it set my compile sdk to 21 and my build tools to 23 is that right? I'm in for some...fun?
|
# ? Mar 4, 2016 20:27 |
|
OS X is fine for Android work. Maybe better, because it has a better terminal and shell, which you'll periodically have to flex.
|
# ? Mar 4, 2016 20:43 |
|
There's no maybe about it, OSX is better, if only for not having to deal with ADB drivers for all the devices you want to test on.
|
# ? Mar 4, 2016 21:14 |
|
I think every Android presentation I've ever watched was run off a Macbook
|
# ? Mar 4, 2016 21:34 |
|
Re drivers: It says my Nexus 6p has API1 on the device list on osx...
|
# ? Mar 4, 2016 21:48 |
|
Anyone done any testing on Android N and found any major pitfalls? Been in a crunch-time project and haven't had a chance to check it out as much as I'd like.
|
# ? Mar 13, 2016 04:29 |
|
speng31b posted:Anyone done any testing on Android N and found any major pitfalls? Been in a crunch-time project and haven't had a chance to check it out as much as I'd like. If you're using the NDK, linking against or dlopening private libraries will stop working as soon as your application has a target SDK level of N or greater.
|
# ? Mar 13, 2016 06:35 |
|
Hi guys, quick question about Dagger 2. I think I read that any class with an @Inject annotated constructor is one that Dagger implicitly understands how to create. So does that mean I literally don't need to expose it anywhere? Not in a module with @Provides, nor as a method in a component? Sorry if this is a bit of a dumb question, I'm kind of diving head first into dependency injectors.
|
# ? Mar 28, 2016 19:44 |
|
Yeah @Inject annotating a class's constructor should make it globally available to DI. Also, genuinely not trying to be snarky or whatever, but one of the cool things about Dagger/Dagger2 is that it will give you compile time errors explaining very well what you can and can't do, so the quickest way to find answers to questions about how Dagger works is usually to try to compile it and see if it works, and if not, what the compile error was. Also take a look at the generated code to see how scoping and stuff like that works; it's pretty straightforward so even the generated code tends to be pretty clear and easy to follow.
|
# ? Mar 28, 2016 20:38 |
|
Hey guys, more newbie questions! We are implementing a page in our app and we would like it so if you click on a TextView for, say, the Suicide Prevention hotline, it will ask you if you wish to dial the phone number. However, i can't seem to figure out how to do this. I also can't figure out how to make a TextView a clickable link that opens chrome and takes the user to a certain website. I'm not sure if it can take you to a different app or if it can just pop up a little "web view"? thing that you doesn't remove you from the app itself. Thanks for the help!
|
# ? Mar 29, 2016 01:10 |
|
Tusen Takk posted:Hey guys, more newbie questions! We are implementing a page in our app and we would like it so if you click on a TextView for, say, the Suicide Prevention hotline, it will ask you if you wish to dial the phone number. However, i can't seem to figure out how to do this. The parent class View has the methods setClickable() and setOnClickListener(). All you need to do is make sure that clickable is set to true and then set a listener that does whatever you darned well please. You can do this in XML with the android:clickable attribute and the android:onClick attribute. I do not recommend using the latter as the method you use is required to be in the activity, which IMO gets a little unwieldy, so my preference is to get a reference to the TextView in code and set a listener for it. Listeners are easy to write, if you haven't written one yet. Since a listener can contain any code you want, all of the things you mentioned are possible. Lucky for you, Android provides a facility to make clicking on text with a phone number and dialing it REALLY simple. Check out this XML attribute. I don't think you even need an OnClickListener for that view. As far as opening up a page, it should be relatively straightforward. Your OnClickListener can do something that swaps the appropriate fragment or view with a fragment or naked WebView(this documentation also tells you how to open the browser). speng31b posted:Yeah @Inject annotating a class's constructor should make it globally available to DI. Also, genuinely not trying to be snarky or whatever, but one of the cool things about Dagger/Dagger2 is that it will give you compile time errors explaining very well what you can and can't do, so the quickest way to find answers to questions about how Dagger works is usually to try to compile it and see if it works, and if not, what the compile error was. Also take a look at the generated code to see how scoping and stuff like that works; it's pretty straightforward so even the generated code tends to be pretty clear and easy to follow. Thanks! And I'll be sure to do experiment and take care of that compile time guarantee in the future.
|
# ? Mar 29, 2016 01:26 |
|
Tusen Takk posted:Hey guys, more newbie questions! We are implementing a page in our app and we would like it so if you click on a TextView for, say, the Suicide Prevention hotline, it will ask you if you wish to dial the phone number. However, i can't seem to figure out how to do this. Webviews are loving godawful for about a thousand reasons, use an intent to open the browser if you need to view an external page, or better yet, Chrome custom tabs (https://developer.chrome.com/multidevice/android/customtabs) - the new hotness because they're smooth and nice and good and not at all loving unbelievably terrible like webviews. Don't use webviews unless you've run out of all other options. One of the few legitimate uses of webviews is for oauth when services don't provide a decent client library for it. MAYBE for a minimally styled page without scripts, like a Terms & Conditions/Legal, that you need to update without the overhead of a release. Otherwise, just don't use a stupid loving webview. speng31b fucked around with this message at 05:16 on Mar 29, 2016 |
# ? Mar 29, 2016 04:52 |
|
Fergus Mac Roich posted:The parent class View has the methods setClickable() and setOnClickListener(). All you need to do is make sure that clickable is set to true and then set a listener that does whatever you darned well please. You can do this in XML with the android:clickable attribute and the android:onClick attribute. I do not recommend using the latter as the method you use is required to be in the activity, which IMO gets a little unwieldy, so my preference is to get a reference to the TextView in code and set a listener for it. Listeners are easy to write, if you haven't written one yet. Okay, brilliant! So for instance, in this snippet of code: XML code:
With the web links, can it be embedded like this or do i have to actually put the web link in a separate TextView with the actual URL spelled out?
|
# ? Apr 1, 2016 03:03 |
|
|
# ? May 15, 2024 03:23 |
|
Oh and since this is a different subject, I'll double post: I have a database that already exists that I have imported into Android Studio, and I would like to be able to insert values into it and keep it super simple just for demonstration purposes because the database that my partner decided to use for the website version of the app doesn't allow external connections and i didn't figure this out until it was already built out and it would be too annoying to backtrack and use something like firebase or whatever SO I'm using the SQLiteOpenHelper and I'm struggling trying to figure out how to simply insert. I found this article but it seems to be for read-only database and doesn't have a way to actually write to the database. I tried using it anyways but I've been trying to figure this out for a few days and I'm getting to my wits end since all the online demos for the SQLiteOpenHelper class are for single-table databases Here is the structure of my database with all the tables and columns: Extrapolating what I've read, I think I would need to create an insert method for each table, so for instance insertJournal would insert the user's journal entry into the database, and insertFeeling would insert whether the user selected a certain feeling to accompany how they were feeling when they wrote that journal entry. I just can't figure out how to properly write an insert method that doesn't make the app crash and then call it from a different class in order to write whatever the user entered to it. I'm positive that there has to be a simpler way to do it than what I have so far, so any guidance would be amazing Sorry i've been blowing this thread up lately, I have to do a dry run on the working product in two weeks and this has been my limiting factor. edit: jesus christ i just watched a youtube video about it and inserting is way, way less complicated than i've been making it I don't think I need help anymore FAT32 SHAMER fucked around with this message at 04:21 on Apr 1, 2016 |
# ? Apr 1, 2016 03:30 |