Questions Thread - June 16, 2016

Questions Thread - June 16, 2016


Questions Thread - June 16, 2016

Posted: 16 Jun 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]

Bluetooth / BLE development is miserable on Android. Anyone know any special tricks?

Posted: 16 Jun 2016 02:02 PM PDT

I have been working on multiple projects that utilize a variety of BLE devices. Overall, it has been pretty rough- different Android phones and tablets have varying degrees of success or failure when trying to connect and transmit data from different bluetooth sources.

I frequently run into a variety of problems:

  • GATT failure 133 or 129
  • Choppy / intermittent scanning (particularly on cheaper devices)
  • Devices not showing up in scan, even when in very close proximity
  • createBond entering BOND_BONDING but never reaching BOND_BONDED, instead it just fails and returns to BOND_NONE

Has anyone else here tried working with BLE on Android? Are there any secrets or tricks you've found to improve stability of BLE? Is there something important that changed in Android 6 that I should know about?

Thanks.

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

Block This (a DNS based ad blocker) is now Open Source.

Posted: 16 Jun 2016 05:41 AM PDT

Hello. I just wanted to let you guys know I've decided to Open Source my ad blocking app - Block This. I would be very happy if the source code helps you learn something or if you decide to join and help further develop the app.

GitHub: https://github.com/ggsava/block-this/
Official site: https://block-this.com/

Edit: As some of you asked how you can help - the best way is to join the forum and create a discussion in the dev section here: https://forum.block-this.com/category/13/developers

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

How to make Google Play not show my address publicly?

Posted: 16 Jun 2016 07:34 PM PDT

I've seen other apps with in app purchases that don't have their address publicly displayed on Google Play, is there any way to do this?

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

How to create an app to generate passive income

Posted: 16 Jun 2016 10:36 PM PDT

Random Musings on the N Developer Preview 4 - The CommonsBlog

Posted: 16 Jun 2016 09:50 AM PDT

Firebase vs. Parse Server

Posted: 16 Jun 2016 04:43 PM PDT

Why We Chose QueueFile for Reliable Request Batching on Android

Posted: 16 Jun 2016 11:42 AM PDT

What is the state of Visual Studio/Xamarin for Android development these days?

Posted: 16 Jun 2016 10:41 AM PDT

Hey all,

I've been trying my hand at some Android development, and it's difficult, but quite fun. I've been using Java for about 2 years now, and I'd like to start flexing some of my C# muscles.

I've just (!!) realised that it's possible to develop for Android with Visual Studio/Xamarin - my question is basically this:

Is this a good idea, and why?

To further expand on the question, it's a question of whether there is a) community support for it, b) whether it's one of those 'it'll work, but ONLY IF' scenarios, and c) whether I'm better off sticking with Android Studio.

Thanks all.

submitted by /u/rightly-left
[link] [comments]

How do you deal with design measurement specifications that involve text?

Posted: 16 Jun 2016 06:09 PM PDT

To elaborate, text has padding that designers don't seem to account for (how could they?)

I have an example from the material design documentation for Bottom Navigation (what I'm currently working on). The specs say the following:

Height: 56dp

Icon: 24 x 24dp

Padding: 6dp above icon (active view), 8dp above icon (inactive view) 10dp under text 12dp left and right of text

Text label: Roboto Regular 14sp (active view) Roboto Regular 12sp (inactive view)

If you run the numbers, 56dp (total height) - 8dp (top padding) - 10dp (bottom padding) - 24dp (icon size) = 14dp remaining

Here's an image from the docs:

Screencap

There's a couple of issues here.

As you can see, there's a gap between the text and the icon that isn't accounted for in the specs. Also, the padding on the text is not accounted for (the 10dp bottom padding goes right to the very baseline of the text). Also, which constraint breaks when the system font size is increased?

When I implement the design with the exact measurements given in the document it looks something like this:

Screencap

This doesn't look as nice as the wireframe.

In my real job, I run into issues like this with pretty much all of the designs I receive from our designers. I end up tweaking things until it looks more like the wireframe they sent me, but the numbers are almost always different from what they spec. I'm curious as to how other devs usually handle this sort of thing.

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

Making Money With Your Android Apps

Posted: 16 Jun 2016 11:46 PM PDT

HELP! App suspended due to Deceptive Behavior

Posted: 16 Jun 2016 10:02 PM PDT

How to contact a proper support? The support that replied to my first appeal is not helpful. I submitted another appeal with this text:

I submitted this app because the first app with package name "com.adcentral.lrisched" was also suspended erroneously. And I cannot change the description so I created another one with a better description so it is clear to YOU reviewers that it is not deceiving the users.

The first line of the description is "This is not a real fingerprint app. It does not in any way scan your actual fingerprint", why "suspend" it if it hasn't even been approved and published yet. I submitted the app and the next time I refreshed my console it shows "suspended".

Why is this happening? It's description is much detailed now, and does not claim that it is a fingerprint app, IT"S NOT A FINGERPRINT APP. It's an app with a fingerprint IMAGE as a button.

Again, this is NOT a fingerprint app. It's an app with a button that looks like a fingerprint. It is STATED in the first line of the description.

We seriously need this app today. PLEASE REVIEW PROPERLY.

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

Modules: Best time to use them?

Posted: 16 Jun 2016 10:51 AM PDT

I wanted some information on modules. A Google search doesn't help me with when should modules be used. I make apps and keep all my features cataloged in a folder and my partner wants to put every single feature into its own module. Is this the use case for modules? Would it be bad design to have 10 or so modules (each its own feature) in a project? I should also mention that some of these features interact with one another. Would implementing modules break the interaction between each other?

Any insight on this issue would greatly be appreciate it. I apologize if this isn't the right place to ask this question, but this community seems it would be knowledgeable on the subject.

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

Developer Console error: Your reply failed to send. Please try again later. (668269003)

Posted: 16 Jun 2016 06:01 AM PDT

Is anyone seeing this error? I've been trying to respond to a user review for 2 days now and keep getting this same error:

Your reply failed to send. Please try again later. (668269003) 
submitted by /u/NotMichaelBay
[link] [comments]

Dependency Inversion using Dagger2

Posted: 16 Jun 2016 08:21 AM PDT

Test my open-source productivity app

Posted: 16 Jun 2016 12:21 AM PDT

Thanks for reading my news about Questions Thread - June 16, 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.