Questions Thread - May 29, 2016

Questions Thread - May 29, 2016


Questions Thread - May 29, 2016

Posted: 29 May 2016 05:06 AM PDT

This thread is for simple questions that don't warrant their own thread (although we suggest checking the sidebar, the wiki, or Stack Overflow before posting). Examples of questions:

  • How do I pass data between my Activities?
  • Does anyone have a link to the source for the AOSP messaging app?
  • Is it possible to programmatically change the color of the status bar without targeting API 21?

Important: Downvotes are strongly discouraged in this thread. Sorting by new is strongly encouraged.

Large code snippets don't read well on reddit and take up a lot of space, so please don't paste them in your comments. Consider linking Gists instead.

Have a question about the subreddit or otherwise for /r/androiddev mods? We welcome your mod mail!

Looking for all the Questions threads? Want an easy way to locate today's thread? Click this link!

submitted by /u/AutoModerator
[link] [comments]

Some of my favorite Kotlin features (that we use a lot in Basecamp) — Signal v. Noise

Posted: 29 May 2016 01:40 PM PDT

Reminder - Easily save and restore view state to allow offline app navigation!

Posted: 29 May 2016 08:52 PM PDT

Hi /r/androiddev!

We just made our first release of a new library. It allows easy storage and retrieval of state information in the views. Basically, onSavedInstanceState on steroids.

Reminder on Github

The library's readme has an in-depth explanation on how to use it, but the basic idea is to save the state of the view when it's stopped/destroyed and immediately populate it again when it's resumed, even across different sessions.

Let us know what you think! Issue uploads are always welcome!

submitted by /u/nardi-LAS
[link] [comments]

Everything you need to know about implementing Android and iOS Mobile Deep Linking

Posted: 29 May 2016 01:13 PM PDT

Node.js library for App Store Optimization on Google Play

Posted: 29 May 2016 11:55 AM PDT

Android Studio RecyclerView Tutorial

Posted: 29 May 2016 08:32 PM PDT

Hey there, I just posted a new video tutorial on how to create your first RecyclerView application. It's just the 'bare bones' necessities of what you need to get a RecyclerView going. Check it out and let me know what you guys think!

YouTube: https://www.youtube.com/watch?v=B61b1Y13qwQ Blog: http://www.codingwithmitch.com/ 

--Mitch

submitted by /u/mitchtabian
[link] [comments]

Anyone figured out how to cache mp4 videos in ExoPlayer?

Posted: 29 May 2016 01:50 PM PDT

So... There are videos in our app. We have a functional video player, built on top of Google Media Framework[1] which builds on top of ExoPlayer.

Now there's this known issue where you can't really cache plain ol' h264 mp4's - https://github.com/google/ExoPlayer/issues/420

This basically means that if you watch a 5 second video, finish it and then seek to 2 seconds it's gonna download the whole thing again like it's 2004. This incurs a costly delay until it starts playing again.

Now, I find it hard to believe nobody solved this. or at least worked around it. maybe someone found a solution out there in the wild wild web of android resources IDK.

So I need yer help people. Any pointers?

Mucho Appreciado.

[1] https://github.com/googleads/google-media-framework-android

submitted by /u/yobababi
[link] [comments]

Android Dialogs: Rebecca Franks: Book Dash & Firebase

Posted: 29 May 2016 11:20 AM PDT

Being fullstack, how do I stay updated with what's new in Android?

Posted: 29 May 2016 12:43 AM PDT

So I am the only developer at a little startup. I have to do everything from making the apps to designing the ReST APIs. Android evolves so fast and on so many fronts that it becomes hard not get outdated.

As a fullstack developer, what's the best way to learn the newest features of Android?

submitted by /u/codeflame
[link] [comments]

Whatever happened to the guy who wanted to make icons for everyone?

Posted: 29 May 2016 08:14 AM PDT

I didn't get a reply. Was he just advertising himself?

submitted by /u/lucidifier
[link] [comments]

TheDailyWTF: Code review malediction (not safe for sanity)

Posted: 29 May 2016 05:20 PM PDT

Android Application Architecture — my own take

Posted: 29 May 2016 02:27 PM PDT

Lately there were a lot of questions and posts about android application architecture, android itself has it own set of problems that make android application engineered in unique way... we are (as community) on continues search for better and painless ways to create software

I write software for living, I keep switching between languages and platforms almost daily, in such short time, I have to open project, get in context quickly, write code, test, release, repeat... I may also copy code between projects and customize it as needed

for example most of my clients require users login, I won't write the same thing for brazillion times, I need just copy / past users package (plus res, which is a problem), what's inside users?

/Users/ /Users/Users*Activity.java /Users/Users*Fragment.java /Users/Users*State.java /Users/Users*Config.java /Users/UsersService.java /Users/UsersBackend.java 

there is few interesting parts, users API from UsersService

startLoginActivity startLoginActivityForResult startLogoutActivity getCurrentUser isUserPro isUserLoggedIn ... 

then modify UsersBackend to implement few interfaces for client / server logic, this enables me to re use code easily between project, adding a feature is matter of checkout code then integrate using APIs, State classes holds screen states, such as scroll position, anything that may get lost if app is killed, this helps resuming UI smoothly, UsersConfig.java for various settings

the general strategy to create package per feature instead of grouping similar classes, then other packages can only interact with others via an API

I hope I'm not alone using this approach... & I hate code injections

submitted by /u/adel_b
[link] [comments]

[Library] A series of badge drawables.

Posted: 29 May 2016 02:37 AM PDT

Need Help. Android Extremely Buggy, Cant Enable Developer options

Posted: 29 May 2016 02:13 PM PDT

Motorola G(2014) I've had this phone for well over a year now, to be honest for a budget phone it really does the job. Great camera, love the sd card slot upgrade and the dual speakers on front. But when it comes to performance the phone is really bad. Just now i was watching YouTube, for 3 weeks my phone has been restarting by itself when too much memory is used, so this time it happened and when it did; My Moto's home button is not working although pressing, i cant see my notifications nor slide the drawer down, i can't access developer options nor can i factory reset because when i turn the phone off it turns on by itself. I'm really baffled and angry by how much the motorola support helped me. Seems like the only solution is to go for cm, although im not sure i want to try that since i cant enable usb debugging. Need Help Asap, Thanks in advance.

submitted by /u/Fevolt
[link] [comments]

Language Switcher Library

Posted: 29 May 2016 02:32 AM PDT

Are there any libraries for implementing a language switch in Android apps? The problem with using the system locale is Android doesn't support all languages.

We've tried porting some open source language switchers to our app but the view language doesn't change. It's like androids locale prevents it from changing.

Thoughts?

submitted by /u/bkerensa
[link] [comments]
Previous
Next Post »