Questions Thread - June 01, 2016

Questions Thread - June 01, 2016


Questions Thread - June 01, 2016

Posted: 01 Jun 2016 05:08 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]

RxUi: Talking to Android View layer in a Reactive way

Posted: 01 Jun 2016 08:04 PM PDT

First interview for an Android development position tomorrow, any advise/tips?

Posted: 01 Jun 2016 06:32 PM PDT

Hey everyone, I have an important interview tomorrow regarding an Android developer position (more of a junior type position). I'm super excited, but kind of nervous I'll get stumped on something I don't know. I've been studying over everything and anything android related to help prepare myself. I think I've covered just about all of the basics. Just wondering if anyone has any advise on maybe what to really focus on or maybe what are some things all android developers should know?
Thanks for any input! Appreciate it.

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

Back up your keystore!

Posted: 01 Jun 2016 01:34 AM PDT

So the unthinkable happened to me last night, I lost the only copy of my keystore. If you don't know why this is bad, this should be nightmare fuel for any Android dev. Put simply, if you can't recover the keystore, you're never going to be able to update your app ever again. The only option is to unpublish the app and upload an entirely new one (new bundle ID, new authorities etc).

It's not that big of a deal as I was only on my 2nd update of my app, but it meant I lost all my reviews and statistics when I had to create my app from scratch.

I personally feel that third party engines like Unity do not really stress how incredibly important the keystore is to later development, so I thought I'd share my story so no-one else from all's into the same trap.

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

ELI5: Regarding app indexing, which in-app elements are used to determine when my app will show in search results

Posted: 01 Jun 2016 11:58 AM PDT

All the Google website says is "Google Search can index URLs that work for both your site and your app" and "Using the App Indexing API.... provides the basis for link titles and content snippets associated with your content".

  • Is this just a compilation of keywords found across my website and app?
  • Is a heavier weight given to either my website or in-app content?
  • What in-app content is indexed?

I was hoping someone could provide me further insight.

submitted by /u/The-Walking-Dev
[link] [comments]

Is there a better way with static imports and espresso?

Posted: 01 Jun 2016 07:27 PM PDT

I'm working on writing some tests with Espresso and its super annoying not being able to look up functions without having to check the documentation, and then static import a single method just to use it. Is there a better way or is this just how android testing works..?

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

Instant run causing incredibly long app start times? (SO solutions unhelpful -- looking for insight).

Posted: 01 Jun 2016 11:52 AM PDT

Problem: When my app is built via instant run, the application takes roughly 15 seconds longer to startup. That is, my Application's onCreate takes forever to even get hit.

Here are some posts I've taken a look at:

http://stackoverflow.com/questions/36496217/android-studio-2-0-stable-slow-down-app-startup http://stackoverflow.com/questions/36544392/android-app-starting-slow-dex2oat-zip-is-absent-canceled-gradle-2-10/36576432 http://stackoverflow.com/questions/36575229/android-studio-2-0-pause-white-screen-on-app-first-run http://stackoverflow.com/questions/36640430/app-taking-30-seconds-to-startup-after-using-of-new-instant-run-feature-in-andr

It seems the general solution is to switch to SDK 21 to speed up dev builds -- but that does not work for me. In fact, none of these solutions work for me.

Has anyone dealt with this at all?

Edit: A bit of an update.

So I tried simply playing around with my library in the application class.

If I don't start my library in the application class, things run fine.

But if I DO start it there, dex2oat runs on every single dependency -- as well as 'slices'

For example:

06-01 15:56:54.616 6153-6153/? I/dex2oat: /system/bin/dex2oat --debuggable -j2 --dex-file=/data/data/com.my.example/files/instant-run/dex/slice-okhttp-ws3.0.1_e167ff51c6a915eedb365c218db7fecf2f9e10e4-classes.dex --oat-file=/data/user/0/com.my.example/cache/slice-okhttp-ws3.0.1_e167ff51c6a915eedb365c218db7fecf2f9e10e4-classes.dex 06-01 15:56:54.669 6153-6153/? I/dex2oat: dex2oat took 53.508ms (threads: 2) arena alloc=45KB java alloc=53KB native alloc=1431KB free=1384KB 06-01 15:56:54.715 6163-6163/? I/dex2oat: /system/bin/dex2oat --debuggable -j2 --dex-file=/data/data/com.my.example/files/instant-run/dex/slice-okhttp-urlconnection2.4.0_b03f6379e21f2baf93382aa994f6a6cf629c6b1e-classes.dex --oat-file=/data/user/0/com.my.example/cache/slice-okhttp-urlconnection2.4.0_b03f6379e21f2baf93382aa994f6a6cf629c6b1e-classes.dex 06-01 15:56:54.759 6163-6163/? I/dex2oat: dex2oat took 44.646ms (threads: 2) arena alloc=50KB java alloc=43KB native alloc=1439KB free=1376KB 06-01 15:56:54.808 6172-6172/? I/dex2oat: /system/bin/dex2oat --debuggable -j2 --dex-file=/data/data/com.my.example/files/instant-run/dex/slice-okhttp3.2.0_ab56e8254e8534794f715d67bf1aa91e76d6b9cd-classes.dex --oat-file=/data/user/0/com.my.example/cache/slice-okhttp-3.2.0_ab56e8254e8534794f715d67bf1aa91e76d6b9cd-classes.dex 06-01 15:56:55.066 6172-6172/? I/dex2oat: dex2oat took 259.376ms (threads: 2) arena alloc=171KB java alloc=312KB native alloc=2MB free=1800KB 
submitted by /u/Victawr
[link] [comments]

Be Careful of Drag-and-Drop on Android N - The CommonsBlog

Posted: 01 Jun 2016 01:04 PM PDT

Migrating to Google Sign-In from Google Plus Sign In.

Posted: 01 Jun 2016 11:03 PM PDT

What motivates you?

Posted: 01 Jun 2016 05:02 AM PDT

Im 15 and started developing my first app a month ago today, and started learning a few months ago. However, i have come to a stop. I have the structure of the app ready and all i need to do is add the information, however i have 2 problems.

1 - Im not happy with the design, but cant afford a graphic designer.

2 - I have no motivation to improve it, or even finish it. I know i want to , but when it comes round to it i always don't do it or come up with an excuse as to why i should't.

I have been having these problems for about a week now, and i just want to know what motivates everyone here to keep developing.

Thanks - Max

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

AdapterViews and Espresso - Wojtek Kaliciński

Posted: 01 Jun 2016 12:37 PM PDT

If your app uses a lot of space for no good reason now is the time to start worrying

Posted: 01 Jun 2016 05:12 AM PDT

Managing the Fragment Back Stack

Posted: 01 Jun 2016 08:03 AM PDT

First Impressions of Android’s new ConstraintLayout — Google Developer Experts

Posted: 01 Jun 2016 05:09 AM PDT

NetworkLogUtility class for Retrofit2

Posted: 01 Jun 2016 01:32 PM PDT

I made a boilerplate from ribot's one but that use Realm. (MVP/Dagger 2/Retrofit/Realm/Rx)

Posted: 01 Jun 2016 01:57 AM PDT

5 Top Android App Testing Challenges

Posted: 01 Jun 2016 05:36 AM PDT

What you think about this approach of Android architecture: Activity Presenter?

Posted: 01 Jun 2016 05:27 AM PDT

Thanks for reading my news about Questions Thread - June 01, 2016 at my blog Custom Droid Rom if you want too share this article, please put the resource, and if you think this article is very usefully dont forget to bookmark this site with CTRL + D on your keyboard to web browser.

New and Hot Article's :

Note: only a member of this blog may post a comment.