Weekly "who's hiring" thread!

Developing Android Apps - Mon, 01/15/2018 - 07:46

Looking for Android developers? Heard about a cool job posting? Let people know!

Here is a suggested posting template:

Company: <Best Company Ever>
Job: [<Title>](
Location: <City, State, Country>
Allows remote: <Yes/No>
Visa: <Yes/No>

Feel free to include any other information about the job.

submitted by /u/AutoModerator
[link] [comments]
Categories: Android, Linux

Moronic Monday (Jan 15 2018) - Your weekly questions thread!

Android - Mon, 01/15/2018 - 06:12

Note 1. Join us at /r/MoronicMondayAndroid, a sub serving as a repository for our retired weekly threads. Just pick any thread and Ctrl-F your way to wisdom!

Note 2. Join our Discord, IRC, and Telegram chat-rooms! Please see our wiki for instructions.

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

Weekly Questions Thread - January 15, 2018

Developing Android Apps - Mon, 01/15/2018 - 05:55

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!

Also, please don't link to Play Store pages or ask for feedback on this thread. Save those for the App Feedback threads we host on Saturdays.

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

submitted by /u/AutoModerator
[link] [comments]
Categories: Android, Linux

Key Intercept on a Pixel 2

Tasker: Total Automation for Android - Mon, 01/15/2018 - 03:45

Hello fellow taskerists!

I've just upgraded my phone to a Pixel 2 (from a Sony) and all my key intercepts have stopped working.

Tasker has admin, battery optimisation is off, accessibilitiy services are on. Does anyone else have this working on a Pixel 2?

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

The best Android app developer profile / portfolio

Developing Android Apps - Mon, 01/15/2018 - 02:27

Where I can see the list of top android developers along with their work examples. I am curious about trending app categories for my sake.

submitted by /u/Danielcarl2435
[link] [comments]
Categories: Android, Linux

Copy paste names and email addresses to Google spreadsheet.

Tasker: Total Automation for Android - Mon, 01/15/2018 - 01:49

I want to setup a task where I copy a name and it pastes the info to a Google spreadsheet under column "name" and another task where i copy the email address it pastes the info to the same spreadsheet under column "email".

I am stuck on how to create the event in join that will trigger the spreadsheet plugin to add the names and email addresses.

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

Can't import android.widget.* or* in the basic project; why is this? (xpost)

Developing Android Apps - Mon, 01/15/2018 - 00:04

I've tried import* and android.widget and it won't take either.

I'm really at an impasse as I'm trying to start adding onclick type functionality and get my mind around how this studio works. Any help would be greatly appreciated. It's not my install because if I do the basic activity, import* are imported and work just fine.

Thanks very much in advance!

submitted by /u/Azidethrowaway1
[link] [comments]
Categories: Android, Linux

Am I understanding leaking context correctly?

Developing Android Apps - Sun, 01/14/2018 - 23:23

My activity makes a network request to fetch data. Once I have it I create my adapter:

subscr = api.getCars(2018, "hatchback") .subscribeOn( .observeOn(AndroidSchedulers.mainThread()) .subscribe(new SimplifiedObserver<List<Car>>() { @Override public void onError(Throwable e) { } @Override public void onNext(List<Car> results) { adapter = new CarAdapter(results); recyclerview.setAdapter(adapter); } });

The observer I define above is inside an activity, and as an anon class instance it holds a reference to the activity. If I rotate the screen, 1 of these happens:

  1. The activity is killed by the time the network request finishes. When the adapter tries to work with views that no longer exist you get a null pointer exception.

  2. Before the null pointer exception occurs the garbage collector sees that the views are still waiting to be updated with a running request so it does not reclaim memory to the heap. Since the activity is being recreated we would not want that old activity and since it is unecessarily taking up memory we have a leak.

Would a solution to both problems be to unsubscribe from the network request like:

@Override public void onPause() { super.onPause(); subscr.unsubscribe(); }

How about if I didn't unsubscribe, would the leak matter? Wouldn't it only be for the duration of the network request?


submitted by /u/canolaalvarez
[link] [comments]
Categories: Android, Linux

PSA: In Android 8.0 EditText boxes are all defaulted to "auto" for Google's form autofill.

Developing Android Apps - Sun, 01/14/2018 - 22:49

So if you start seeing weird suggestions that textType won't affect, set isImportantForAutofill to "no".

submitted by /u/Synyster328
[link] [comments]
Categories: Android, Linux

Use a variable found in Google assistant

Tasker: Total Automation for Android - Sun, 01/14/2018 - 22:20

Hello! I have read through so much involving Tasker and Google assistant, but haven't found any answers for quite what I want to do.

Pixel buds, on a non pixel phone, are a pain to check the battery life. To do this, you have to open Google assistant, tap headphone settings, and then you can see the exact battery %. So, I want to retrieve this battery level for use in a number of ways, I just can't figure out how to access that value with Tasker. Here are images of what the screens look like. screen 1 screen 2. Also, would this value be available without actually opening that screen?

Any help is appreciated!

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