Questions Thread - June 15, 2016

Questions Thread - June 15, 2016


Questions Thread - June 15, 2016

Posted: 15 Jun 2016 05:07 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]

Android N APIs are now final, get your apps ready for Android N!

Posted: 15 Jun 2016 10:10 AM PDT

I'm stuck on an Play Store APK rejection cycle from hell, someone please tell me how I can fix this?

Posted: 15 Jun 2016 07:24 PM PDT

I have an app which is essentially an specialized web browser. It is implemented using the Android WebView. The app has been on the Play Store for about 2.5 years. It has over 1 million downloads and a rating of 4.3 (and climbing).

Over the past few months I've been working on a big new version of the app. At the beginning of May I released the first alpha of the app to my alpha community. Since then I've been releasing a new apk almost every day. Mid to end of May I moved the apk to my beta community. I continued releasing updates almost every day.

On June 2nd after I released an apk I got an email saying the apk had been rejected because it violates section 4.4 of the distribution agreement. They gave YouTube background playback as an example.

I wasn't sure what I had done to cause this but I did remember a week or two before that I had removed my calls to webView.pauseTimers() but I kept my calls to webView.onPause(). I tested to make sure videos were paused when leaving the app, specially YouTube videos and it all seemed fine. Even though I couldn't reproduce the issue I changed my code a bit, made sure my WebView is getting paused any time the activity is not visible and submitted a new apk and voila the apk was accepted and published.

The rest of the week I kept submitting apks without issue. then June 11th I made a tiny change and submitted a new apk and it got through. As soon as the update went through I realized I didn't update my translations so I did that and the new apk got rejected. And since then I've been having most apks rejected.

I filed an appeal on June 11 at around noon. They said I would hear back on 72 hours but by Tuesday the 14th at noon I had not heard back so I contacted them through the Play Store Console email. A few hours later I heard back and they said my app was rejected because I was enabling YouTube playback while on the background.

At this point I went over my code again and made some tiny changes. Basically on the onPause() method of my activity I moved the super.onPause() call to the bottom so that my pausing of all the WebViews happens first. I have no idea if that makes a difference or not but I figured the earlier it happens the better. I also add the same pausing code to onUserLeaveHint(). I don't like the redundancy but at this point I just want to move on with my life. After those changes I submitted a new apk and it got through.

Then this morning (June 15) I updated translations, finished fixing some final crashes (nothing related to the WebView) and uploaded what I had hoped would be my final apk before moving it to production and of course, it got rejected. I have since added back webView.pauseTimers() and uploaded a new apk but it got rejected as well.

So I'm at a loss as to what I should do now. I've spent the last 2+ months working on this update 50+ hours per week, and I've spent a few thousand on graphic design for this update, and now it looks as if I'm never going to be able to release this. I've tested for this issue they claim I have on every Android version I support and on multiple handsets and emulators but I can not reproduce it.

What can I do?

TL;DR: My 2+ year old app is suddenly violating the YouTube background playback policy but I can't reproduce the issue and haven't been able to fix it.

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

Support Library v24.0.0 released

Posted: 15 Jun 2016 11:41 AM PDT

Last update (June) of Android 6 has run time permission broken. (I let you know before you go crazy)

Posted: 15 Jun 2016 07:10 AM PDT

Ok, so just to let you know, I was developing today and I got a notification to update my nexus 6 to "MOB30M" build. I did, when it rebooted I continue developing, when I was going to test my app the runtime permission did not work, so of course i doubt of my code and I started to become crazy because I did not update the permission code. Finally I got to know that there is a bug, is already reported to google but no idea when it will be fix. That means that if your users update android, run time permission won't work on their phone. Wonderful xD

Some links:

Bug report:

https://code.google.com/p/android/issues/detail?id=213120

Stackoverflow related:

http://stackoverflow.com/questions/37829165/allow-button-not-working-after-update#

EDIT: It has been officially marked as a defect in the last build of Android. The Android team just said that now they know about this and they will fix it in a future release of the OS.

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

Building An Android Application To Track Missing Kids Part

Posted: 15 Jun 2016 08:24 PM PDT

Firebase Analytics vs Fabric Answers. Who's lying?

Posted: 15 Jun 2016 08:13 AM PDT

SQLite, ORMs, NoSQL: what Android developers use and why

Posted: 16 Jun 2016 12:04 AM PDT

How to go from Idea to App Development

Posted: 15 Jun 2016 11:58 PM PDT

Testing Freeform mode in Android N

Posted: 15 Jun 2016 03:53 PM PDT

Has anyone figured out a good way to test their app in freeform mode? I'm trying to get my app ready for Android N and I would like to be able to resize my app easily to test the UI on 220x220 and up.

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

Which ad networks are currently a good choice (app monetization)?

Posted: 15 Jun 2016 03:07 AM PDT

Hi, I haven't worked a while on my apps and wanted to refurbish them a bit. On this occasion, I also planned to rework my monetization strategy, but since there are so many new ad networks and so many others that I used to know died, I have lost a little bit the overview.

So: - Do you have any recommendations which perform extraordinarily good for you? - Are there still (google policy compliant) ad networks with some kind of ppd (pay per download) revenue model (even if it's not much)? Or is it only pay per click these days?

submitted by /u/4mament
[link] [comments]

Switch Fragments in Navigation Drawer Activity

Posted: 15 Jun 2016 08:54 PM PDT

App Diets are not a Fad (Shrinking your APK)

Posted: 15 Jun 2016 08:39 AM PDT

For the indie developers here, do you always create mock-ups when building complex apps and how do you go about it if you do? Also, how do you come up with designs for your app?

Posted: 15 Jun 2016 08:32 AM PDT

I am currently learning android development by reading the big nerd ranch guide. I have an app that I have in mind to create. It's an eCommerce app. When I finish the book, I am planning to take a tutorial on using photoshop to create mock-ups. My question is, is this really necessary? Are there simpler tools I can use to wireframe and create mockups for my app without the whole learning process of Photoshop? I want an app with a really good UI and that is why I intended to learn photoshop but I am open to alternatives which do not require any major training.

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

Do you still use mdpi or hdpi drawables in projects?

Posted: 15 Jun 2016 01:21 PM PDT

Hi there,

I wonder that do we need to use mdpi or hdpi resources in our android projects for example min api 16 (i choose that version generally)

Are there any devices still uses mdpi or hdpi screen resolutions?

Thanks.

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

"Juice it or Lose it" - A great demonstration of the little things that can make your game that much better

Posted: 15 Jun 2016 11:25 AM PDT

Navigation without GPS using step detector

Posted: 15 Jun 2016 04:15 PM PDT

Google Analytics or Firebase?

Posted: 15 Jun 2016 04:04 PM PDT

Hello,

I am extremely new into app development and this is my first app I am working on and am ready to learn some about app analytics. Originally I was going to learn how to use Googles but after Google IO I see they are both owned and updated by Google. So any suggestions what is a preferable option?

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

What are some good location APIs for retrieving surroundings

Posted: 15 Jun 2016 09:33 AM PDT

For example, I send my lat, long and a distance then the API sends back all the gas stations around me within that distance.

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

Anyone is using network/performance monitoring sdk's like newrelic ? do you find them useful ?

Posted: 15 Jun 2016 02:06 PM PDT

What are some challenges faces when companies have iOS and Android developers?

Posted: 15 Jun 2016 07:57 AM PDT

Hi all,

I am a growing android developer and because of that I figured this might be the best place to ask.

I have been doing research but I haven't been able to find any industry problems where the android and iOS teams work together. Currently at my company we are separate and while we have the same app in looks and feel, we really don't discuss things between each other.

I want to stay in android and learn iOS so that I can work more closely with our iOS developer as well as any I may work with in the future. I was hoping someone with (more) industry experience could answer my questions...

  • What are challenges faced between Android and iOS dev teams?
  • What is the design process like for you between Android and iOS developers?
  • What happens if a particular design or function cannot be achieved on the opposite platform?

Thank you!

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

Best way to create animated GIFs for users to share?

Posted: 15 Jun 2016 12:10 AM PDT

So I am currently working on a way so that the user can export the matches his played with my Apps to any kind of social media or whatever. The easiest way to share would either be a video or an animated GIF. Currently I am testing the GIF format and have been able to create a GIF with a resolution of 400x400 and 20 FPS but the creation takes a while. I used the Android GIF Encoder and it is damn slow. To reduce the size of the GIF and increase the speed I added the functionality that only updates part of the image with each frame. While the size is now about 1/15 of the original size the speed doesn't increase. Is there any better way? Any hidden fantastic and free lib that I overlooked?

There seems to be quite the shortage which I think strange as there are so many animated GIFs everywhere.

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

How does YouTube sound persist by using it via browser on desktop mode?

Posted: 15 Jun 2016 03:26 AM PDT

I'm not completely able to articulate my question, so it might be a bit fuzzy, but why does putting the YouTube android application in the background stop the video, as well as using it through a browser in mobile view, but not for desktop view?

I assume it has something to do with how minimizing a browser on a desktop keeps the sound persistent, but the thing is, desktop OS implementation is different than android, is it not?

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

Share URL to Clipboard - cketti

Posted: 15 Jun 2016 08:53 AM PDT

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