|
Thermopyle posted:I'm excited to get back into Android dev with this. The dev cycle being (usually) edit/reload/test in a matter of seconds (and without having to necessarily redo a bunch of steps in your app) is so much nicer. I also think the Chrome developer tools are better than the Android Studio/etc. ones, but not everyone agrees. Volmarias posted:Manufacturers make mistakes that break CTS, then push out an update Interesting, thanks. I guess it's also annoying that you can't reliably find out how old the fix is, since there's no way to get the current time as seen by the location system. (Which seems like the whole point of the fix time, but I guess it has other uses as well.)
|
# ? Sep 14, 2015 20:28 |
|
|
# ? Jun 5, 2024 04:50 |
|
Subjunctive posted:The dev cycle being (usually) edit/reload/test in a matter of seconds (and without having to necessarily redo a bunch of steps in your app) is so much nicer. I also think the Chrome developer tools are better than the Android Studio/etc. ones, but not everyone agrees. Yeah, I have a slight aversion to JavaScript but the live reload is really slick and the idea behind React has me really excited. I'm also hoping React Native for Android somehow hides some of the terribleness of the Android lifecycle from me.
|
# ? Sep 14, 2015 20:46 |
|
I read recently that JSX isn't required to work with React, but how recommended is it? I've kinda ignored React because I didn't want to bother learning "something-like-Javascript-but-not-quite" but now that I know I can use plain vanilla Javascript, and now that React Native is out, I'm considering playing around with it.
|
# ? Sep 14, 2015 21:26 |
|
quote:Interesting, thanks. I guess it's also annoying that you can't reliably find out how old the fix is, since there's no way to get the current time as seen by the location system. (Which seems like the whole point of the fix time, but I guess it has other uses as well.) This was actually an obnoxious bug for me to deal with when writing GPS Notification. OEM sends two callbacks at a time (hell if I know why), one with the correct time and one with 0 and filled with junk. My solution was to discard any fixes with zero. Then, you get callbacks for like two minutes since the last actual fix but with the time that fix was at. OK, fine, discard fixes older than a minute. Then, you get the carrier giving your phone a time a couple minutes in the past, so the fixes are correct but there's a constant delta. Uggghhhh OK fine compare the timestamp against timestamps on the previous fix. Again, everything is technically up to spec, but weird behaviors cause problems.
|
# ? Sep 15, 2015 02:11 |
|
Karthe posted:I read recently that JSX isn't required to work with React, but how recommended is it? I've kinda ignored React because I didn't want to bother learning "something-like-Javascript-but-not-quite" but now that I know I can use plain vanilla Javascript, and now that React Native is out, I'm considering playing around with it. Either way is completely supported...at least on web. I haven't looked at React Native yet. edit: I finally got around to looking at it and...only OS X is supported. :/ Thermopyle fucked around with this message at 02:17 on Sep 15, 2015 |
# ? Sep 15, 2015 02:14 |
|
Thermopyle posted:edit: I finally got around to looking at it and...only OS X is supported. :/ I expect that to change pretty quickly, I think it's just build mechanics.
|
# ? Sep 15, 2015 10:26 |
|
So we've built most of an iOS app in Xamarin and I'm now working on rebuilding the UI in Android, which is my introduction to Android programming. That said: Am I retarded, or is Android's styling setup retarded? The XML state list indirection for choosing colors and drawables based on things like button_state is great (mostly). Does that exist for anything else like setting text sizes or elevation? For the life of me I can't find anything like it, so now I'm in this weird position where some control properties are specified declaratively in XML while others are handled imperatively in code. Also, the state lists seem to only work 1 level deep. So, for example, let's say I want a button with rounded corners that changes only its background color when pressed. I can't just set up a color state list and reference that in a single drawable style, I instead have to create a drawable state list referencing a bunch of mostly duplicated drawable XML files that only differ in the background color they reference. Sorry if this just sounds like rambly ranting, I've just been bashing my head against this Android styling stuff trying to create something that actually has any code reuse. I'm sure half of what I'm saying is wrong and I haven't found The Right Way. Bognar fucked around with this message at 20:42 on Sep 15, 2015 |
# ? Sep 15, 2015 20:39 |
|
Yeah it's a bit of a pain and I'm wrestling with UI stuff myself. I don't know about your stuff specifically, but maybe this will help? http://blog.supenta.com/2014/06/15/how-to-avoid-headaches-with-android-themes-and-styles/ It's a pretty comprehensive overview of how themes and styles work, and how you can stash common attributes in a style so you're not repeating yourself. Maybe you're already familiar with it or it's no use for states, but worth a look I guess
|
# ? Sep 15, 2015 20:57 |
|
baka kaba posted:Yeah it's a bit of a pain and I'm wrestling with UI stuff myself. I don't know about your stuff specifically, but maybe this will help? Thanks, that link is great.
|
# ? Sep 16, 2015 15:09 |
|
Also Dan Lew's video from Droidcon NYC two weeks ago may come in handy. https://www.youtube.com/watch?v=Jr8hJdVGHAk
|
# ? Sep 16, 2015 15:19 |
|
kitten smoothie posted:Also Dan Lew's video from Droidcon NYC two weeks ago may come in handy. I'm just starting in Android (and Java) so I'm hoping this will help a lot. Thanks. Where did you find out about Droidcon? Any other dev events in NYC coming up?
|
# ? Sep 16, 2015 20:44 |
|
rock2much posted:I'm just starting in Android (and Java) so I'm hoping this will help a lot. Thanks. Where did you find out about Droidcon? Any other dev events in NYC coming up? A teammate spoke at Droidcon NYC, so I tagged along. I don't know a whole lot about what else is in NYC, I flew in for the conference ¯\_(ツ)_/¯ There's another Droidcon in SF coming in November FWIW. I found the Droidcon talks to be a whole lot more "useful" and applicable to day-to-day life as an Android developer, as opposed to Google I/O talks.
|
# ? Sep 17, 2015 05:36 |
|
Humble Bundle has a hell of a deal right now for potential Android game developers: https://www.humblebundle.com/weekly $12 gets you GameMaker Pro ($150) PLUS the Android Export Module ($300). You also get the source code of a dozen or so games created in GameMaker (including Stealth Bastard Deluxe and Super Crate Box) to pore over and learn from. It almost seems too good to be true, but it's the real deal. Forget about actually downloading anything today, though - YoYo's site is getting absolutely hammered with the new traffic and it's impossible to login to register the code you get from HB. IAmKale fucked around with this message at 23:46 on Sep 18, 2015 |
# ? Sep 18, 2015 23:42 |
|
I think I did a dumb thing, but I don't know how to fix it. I'm following a lesson plan to make an app in android studio, and got so turned around that I said gently caress it and remade the whole project in another directory. I can open/save/run just fine, but when I try to use android studio to push the files to github, it's only sending my 6 java files. I tried to use these directions to select other files for upload but it's not working: https://www.londonappdeveloper.com/how-to-use-git-hub-with-android-studio/ Edit: fixed it. Deleted all the .git folders in my project, turns off VCS and started from scratch. rock2much fucked around with this message at 21:32 on Sep 21, 2015 |
# ? Sep 21, 2015 17:31 |
|
I'm thinking about ripping out the backend of Awful.apk and replacing it with a new one (that actually does what it should). Maybe ripping out the view apart from the layouts too. What is currently being used for networking, what are the current trends for app architecture? To give an idea, current Awful.apk basically sends a request via some slighty customised Volley and saves the processed data to a sqlite database (for offline browsing for example) . It then outputs the data via contentproviders to the webview. I think, I'm currently not at a computer. So, what be a current way to build something like that?
|
# ? Sep 28, 2015 10:40 |
|
Sereri posted:I'm thinking about ripping out the backend of Awful.apk and replacing it with a new one (that actually does what it should). Maybe ripping out the view apart from the layouts too. The Android folks at my company are mostly using Retrofit/OkHttp for web requests. They're moving to RxJava to do more complicated things with their requests. They're manually using ContentProviders / SQLite for storing data. If you're on the RxJava train SQLBrite (https://github.com/square/sqlbrite) looks neat, but I haven't used it and I'm not sure how popular it is.
|
# ? Sep 28, 2015 20:21 |
I'm new to OpenGL, so I apologize if this is a really basic question, but right now I have a GLSurfaceView. I'm calling getHolder() to gain access to the surface and then the canvas, but when I call canvas.isHardwareAccelerated() on that canvas within my animation thread, that call always returns false. Why would that be? Thanks in advance!
|
|
# ? Oct 1, 2015 04:33 |
|
There's two methods in Surface - lockCanvas() and lockHardwareCanvas(). The docs sez:quote:Gets a Canvas for drawing into this surface. After drawing into the provided Canvas, the caller must invoke unlockCanvasAndPost(Canvas) to post the new contents to the surface. Unlike lockCanvas(Rect) this will return a hardware-accelerated canvas. You'll probably want to go look at that since there are caveats about what you can actually do with a hardware canvas
|
# ? Oct 1, 2015 05:49 |
baka kaba posted:There's two methods in Surface - lockCanvas() and lockHardwareCanvas(). The docs sez: that did the trick, thanks! I wonder if there was a way to do it prior to the Marshmallow SDK, but that's purely academic.
|
|
# ? Oct 1, 2015 06:28 |
|
Nah, it wasn't possible before. The gory details are herequote:As time went on, and devices with general-purpose 3D engines appeared, Android reoriented itself around OpenGL ES. However, it was important to keep the old API working, for apps as well as app framework code, so an effort was made to hardware-accelerate the Canvas API. As you can see from the charts on the Hardware Acceleration page, this was a bit of a bumpy ride. Note in particular that while the Canvas provided to a View's onDraw() method may be hardware-accelerated, the Canvas obtained when an app locks a Surface directly with lockCanvas() never is.
|
# ? Oct 1, 2015 07:18 |
|
Hrnnngh new vector drawable support in Android Studio including automatic PNG generation of every dpi for pre-Lollipop, and a Material icon library right there in the IDE https://www.youtube.com/watch?v=8e3I-PYJNHg Needs a beta version of Gradle right now (haha no) but
|
# ? Oct 2, 2015 17:24 |
|
This is neat, a GitHub repo with a listing of Android development related blogs: https://github.com/ziem/android-development-blogs
|
# ? Oct 4, 2015 02:41 |
|
I'm tearing my hair out over issues with android styling after an update to android studio/the sdk/both. Our app is supposed to have certain themes for its buttons and its actionbar, but for reasons that escape me, it has stopped applying the text colour to the actionbar title. Here is the themes.xml: code:
code:
The Activities that use the custom toolbar have <include layout="@layout/toolbar_basic_layout"/> and toolbar_basic_layout.xml is defined as: code:
|
# ? Oct 5, 2015 12:17 |
is there a clear guide anywhere on how to import libraries like appcompat into an Eclipse Android project? Whenever I try to run mine it fails because of the missing library, despite the build running cleanly and the library project being in the workspace, and I haven't been able to help myself online so far. Thanks!
|
|
# ? Oct 14, 2015 07:13 |
|
There's a guide to building a library project (appcompat is the example) on the developer pages Any reason you're using Eclipse though? It's been dropped for any further updates, and doing this kind of thing is a ton easier in Android Studio (you just add a line to a config file)
|
# ? Oct 14, 2015 07:32 |
baka kaba posted:There's a guide to building a library project (appcompat is the example) on the developer pages Thanks! And mostly because I couldn't get it running in either environment, and I'm much more comfortable navigating Eclipse than IntelliJ. That was going to be the next phase of the operation.
|
|
# ? Oct 14, 2015 07:45 |
|
Yeah I felt the same, and I had some massive headaches importing an existing project and getting Gradle working, but once it's up and running properly it's nice. You're probably worth doing it sooner rather than later!
|
# ? Oct 14, 2015 08:52 |
|
My Android developer team members have been dragging their feet moving over to AS, so I have no choice but to take the initiative and get all of our projects working in Gradle. Just about there, though. The whole "flavors" thing is a a godsend since the majority of our apps run on a dual-config "staging / production" structure, and it makes it a cinch to have Gradle spit out an APK of either version. Plus, I can use the same Gradle commands in my Jenkins builds to do the same thing.
|
# ? Oct 15, 2015 10:01 |
|
I know nothing at all about android but I've been handed some ancient test script to try and fix quickly The problem I'm having is launching an activity in the emulator using a command line. I've been given an APK and have access to nothing else. No code. So far here's what I've done: aapt dump badging MyApp.apk This gave me the following: launchable-activity: name='com.company.myapp.activities.SplashActivity' So it seems I'm meant to plug that activity name into adb, the problem i'm having is the format for the activity/package name. Here's what I'm getting: #:adb shell am start -n com.company.myapp.activities/.SplashActivity Starting: Intent { cmp=com.company.myapp.activities/.SplashActivity } Error type 3 Error: Activity class {com.company.myapp.activities/com.company.myapp.activities.SplashActivity} does not exist. Is there something obvious I'm doing wrong here?
|
# ? Oct 21, 2015 06:47 |
|
The application package name is probably com.company.myapp, not com.company.myapp.activities, although it's kind of poor form of them to put their activities into their own package. You'll want to do -n com.company.myapp/com.company.myapp.activities.SplashActivity
|
# ? Oct 21, 2015 12:42 |
|
Volmarias posted:The application package name is probably com.company.myapp, not com.company.myapp.activities, although it's kind of poor form of them to put their activities into their own package. You'll want to do -n com.company.myapp/com.company.myapp.activities.SplashActivity I think I tried that one. I'll systematically try a bunch of permutations tomorrow. Thanks for the reply!
|
# ? Oct 21, 2015 13:10 |
|
Volmarias posted:it's kind of poor form of them to put their activities into their own package Why is that? I came across something else that said that recently, but didn't say what problem it avoided. I'm just getting back into Android development, so these sorts of gathered lore are interesting to me.
|
# ? Oct 21, 2015 13:25 |
|
Subjunctive posted:Why is that? I came across something else that said that recently, but didn't say what problem it avoided. I'm just getting back into Android development, so these sorts of gathered lore are interesting to me. There's no technical reason to do it or not to do it. I just feel like you shouldn't segregate your code out of the top level package for your project. That said my app does exactly that, but it's for build reasons alone, not by choice. Regarding the intent to start your activity, you should verify what the packagename is for your application via aapt dump badging, and make sure that your explicit intent uses that. Your application packagename might be something totally bonkers and unrelated. You may also wish to do adb lolcat ActivityManager:V *:F and then start your activity via the device launcher, which might be enlightening.
|
# ? Oct 21, 2015 13:59 |
|
Subjunctive posted:Why is that? I came across something else that said that recently, but didn't say what problem it avoided. I'm just getting back into Android development, so these sorts of gathered lore are interesting to me. If you categorize by activities, exploring cross-package dependencies as a heuristic to grok code one major piece of functionality at a time suddenly becomes a lot less consistently useful or predictable.
|
# ? Oct 21, 2015 15:46 |
|
Subjunctive posted:Why is that? I came across something else that said that recently, but didn't say what problem it avoided. I'm just getting back into Android development, so these sorts of gathered lore are interesting to me. One reason is that the R class gets generated in your application's package name's package, so if you want to use it in a class that's in a different package, you need to explicitly import it.
|
# ? Oct 30, 2015 02:19 |
|
What android sdk update was it that set all button text to default to ALLCAPS? I released a build of our app a short time ago, about a week, and the buttons were all normal. I did an SDK update recently and now the build has all its buttons in ALLCAPS. Also, why would Android make this change? What a load of nonsense.
|
# ? Oct 30, 2015 14:31 |
|
The Material / AppCompat themes have all-caps buttons, did you just switch to those recently?
|
# ? Oct 30, 2015 14:45 |
|
baka kaba posted:The Material / AppCompat themes have all-caps buttons, did you just switch to those recently? I don't believe so. I haven't touched the theme/style of the app for a few months. We certainly haven't switched over to material and we've been using appcompat for a while, certainly during the time we had our last release without the all-caps.
|
# ? Oct 30, 2015 15:31 |
|
Gah nevermind - as it turns out it wasn't to do with the SDK, but something else.
|
# ? Oct 30, 2015 17:59 |
|
|
# ? Jun 5, 2024 04:50 |
|
The gah of a coder who's learned the terrible truth
|
# ? Oct 30, 2015 20:55 |