Google I/O 2016 Day 3 Thread

Google I/O 2016 Day 3 Thread


Google I/O 2016 Day 3 Thread

Posted: 20 May 2016 07:51 AM PDT

To keep the front page from getting overrun with posts, we're going to go with daily megathreads for I/O discussion.

Schedule: https://events.google.com/io2016/schedule#day3

Day 1 Thread: https://www.reddit.com/r/androiddev/comments/4jwyrn/google_io_2016_day_1_thread/

Day 2 Thread: https://www.reddit.com/r/androiddev/comments/4k2pud/google_io_2016_day_2_thread/

Cheers,

Da Mods

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

Transitions. Simple and powerful way to create animations

Posted: 20 May 2016 01:21 PM PDT

You don’t need to code it: how I address common Android problems

Posted: 20 May 2016 02:05 PM PDT

Android New APK Analyzer

Posted: 20 May 2016 03:10 AM PDT

did anybody notice that you can actually reverse (decompile) any APK using the new APK Analyzer that is embedded into Android Studio 2.2 P1? literally you could see any app details ( human readable language) XML, java code and anything else that could be reversed. INSTAGRAM APK PIC
EDIT
the APK ANALYZER actually does decompile the apk otherwise you won't be able to see the method names nor the packages, they don't really show you the source code but it is decompiled. you can see the apk resources, libs being used and actually see the actual XML file in readable language as it was developed from AS. sorry for any inconvenience i caused.

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

Interpreting Google "prompting for rating" rule?

Posted: 20 May 2016 08:05 PM PDT

So, the official policy states that the following is a common violation:

Asking users to rate your app while offering an incentive

However, the image displayed is to do with rewarding users for a high rating, not for rating in general.

Does anyone know if offering x gold / xp / whatever in return for clicking the "rate app" button is permitted?

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

How to listen to the database without constantly querying it?

Posted: 20 May 2016 05:26 PM PDT

Alright so I have a local chat function built, but it does not work in real time. It seems like a waste to query the database every few seconds, isn't this very expensive and inefficient? I used Sinch sdk for my private message function, and it works well for 1-1 messages, but a message may not be sent to more than 10 people.

I used Ractive.js in my website to accomplish tasks like these, does Android Studio have any front-end real time services I could use? Someone mentioned Cloud9 or WebRTC; I am not familiar with them but they seem like Back-end shit. I already have my backend working.

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

Firebase and google play services have a lot of duplicated functionality

Posted: 20 May 2016 08:18 AM PDT

Here are the firebase and play services components.

Seems like both have a lot of components in common, should we favor the firebase ones ?

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

Hacking up an ad blocker for Android

Posted: 20 May 2016 07:14 PM PDT

How bad practice is it to store all data in a JSON Array? Alt title: Alternatives to SQLite?

Posted: 20 May 2016 06:47 PM PDT

Hey everyone, I'm more or less working on a simple TODO list with some extra fields in my spare time right now.

Long story short, I never took the time to learn SQLite. I have a basic app with the database portion half working, and hacked together, and have learned to hate SQLite on Android, more or less because I haven't put in the time to learn how it actually works.

Serializing all of my data, pushing it to a JSON Array, and shoving it in shared prefs would take all off 30 minutes for me to do. If the user hits the clear all button, I can nuke the whole thing, and if they add to it, I can write back to the array.

But how bad is it to do this? JSON isn't the most compact format. And I would be writing the whole thing each time the user added a single field. I don't think this would be an issue for my tiny app, but I don't know if it would scale well, or if it is even a good idea in the first place.

Should I get over myself, and put in the time to learn SQLite, or is there some alternative that won't make me feel like I'm forcing a second programming language into my Java?

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

Does "GestureDetector" allow Android to take action if a finger is 1mm above the screen, but not touching?

Posted: 20 May 2016 05:04 PM PDT

I'm needing a situation where the phone screen shows a cursor even if the finer is not touching but only hovering near the screen surface.

I actually need this for a windowsphone, but i thought it would be better to begin where the more advanced developer tools reside... (then i can learn some keywords to look around in the windowsphone area, or change to an android phone)

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

It's nice that the job scheduler API allows us to optimize our apps, but will any developers really use it as intended?

Posted: 20 May 2016 05:09 AM PDT

There are some nice features in the job scheduler, such as being able to define what conditions are required for your job to be processed.

Wait till charge, wait for wifi, and wait till the device is idle... then and only then upload these new photos to the cloud.

But the nice thing about cloud sync is that your data is always available everywhere. Google is asking developers to sacrifice instantaneous sync with an option that'll be better for the battery + memory by making us use the job scheduler. Will anyone really use it "correctly" though? Spotty file sync is a big price to pay for battery optimizations. And the apps reputation pays for the battery savings.

The big problem is that the user can't "see" an app wasting their battery in the background - they don't actively notice that. But they'll certainly notice spotty cloud sync, where photos and other files don't "instantly" appear across their devices. They'll blame this on the app. All because you, the developer, chose to wait for wifi, charge and phone idle state before upload your users photos to the cloud.

The natural reaction to this, then, is to just tell the job scheduler to run your job ASAP.

It would be nice if we all decided to make proper use of the job scheduler, (and I'm sure core apps from Google will) but it is just going to be a "race to the bottom" for the rest of us and most developers are going to just force to job scheduler to run their job ASAP. If a competitors app has seamless file sync (because they do it frequently, wasting a little more battery then usual), and yours just feels spotty (because you are performing optimizations invisible to the user and holding off your sync until the 'right time'), then users will just go with the competitor.

Also imagine if the user had no access to wifi. Or if they lost their phone at the Google Keynote without plugging in, so now all their cool i/o photos (that would normally be synced to their Dropbox) are lost along with their phone. Yikes. 😁

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

Having a very hard time learning how to setup a web API and server for my Android app. Suggestions?

Posted: 20 May 2016 12:58 PM PDT

Since I already know Java, I preferably want to use Jersey or JAX-RS. Some RESTful service.

I've read tons of tutorials on everything ranging from Django to Flask to JAX-RS and now even books like O'Reilly's Java Web Services and I'm finding it all very difficult to follow. Everything I'm finding either assumes I have a lot of previous knowledge on web api's, or are far too short and barely actually teach anything. Far too often I run into a short 'guide' that at some point tells me I want to create a "view," or whatever else, like I obviously know what that even means. Or one of Spring's guides for their framework that barely teaches you anything or explains anything and leaves you hanging to learn more.

I was going through the Android framework so fast just a few days ago and since learning that I need to create a web api, feel I've hit a brick wall in developing my app. And I'm probably making this a lot tougher than it really is, but I can't find anything that walks through setting up a server online, creating a database, handling requests, and user login/authentication. FWIW I know how to work with a MySQL database using the JDBC so I'm not completely unfamiliar with databases and SQL.

Honestly rather avoid Parse because I do want to learn how to setup a web api and I know this would be important for the future, but I feel like I'm beating myself up at this point and not making any progress.

So how did you guys learn how to create web api's? Any suggested resources online?

Thank you.

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

Infer annotations in Android Studio

Posted: 20 May 2016 07:55 AM PDT

So I was watching the "What's new in Android development tools" Google I/O talk, and they mention this feature called "infer annotations". You can see it here:

https://youtu.be/csaXml4xtN8?list=PLWz5rJ2EKKc8jQTUYvIfqA9lMvSGQWtte&t=1260

I couldn't find this feature in 2.2, he mentions it's behind a flag, but there's no information about how to activate it, does anyone know how to do it?

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

[Library] Found this lib: RxBilling

Posted: 20 May 2016 04:15 AM PDT

Espresso test recorder

Posted: 20 May 2016 01:40 AM PDT

Is there a list of common android-specific JVM optimizations so I can stop worrying about stuff that doesn't even matter?

Posted: 20 May 2016 08:47 AM PDT

Common compile-time code optimizations. Like putting constant expressions outside a loop, getting rid of dead code, stuff like that.

Right now I have to keep checking to see if I should sacrifice readability for what seems like a performance boost, but what's the point if the JVM automatically does that optimization?

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

[Discussion] Play Services / Firebase Task API

Posted: 20 May 2016 09:34 AM PDT

What do you guys think about it? I wish they'd embraced RxJava instead. It's nice that you can scope a callback to an activity, but apart from that it feels both too rigid and too weak. Especially when you comepare it to Rx. I want to wrap a task in an observable but "unsubscribing" or canceling a task is not trivial.

According to this talk at IO, we're about to see a lot more of it.

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

Weekly "anything goes" thread!

Posted: 20 May 2016 06:08 AM PDT

Here's your chance to talk about whatever!

Remember that while you can talk about any topic, being a jerk is still not allowed.

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

Can someone do a little piece on setting up a RAM disk to speed up android development?

Posted: 20 May 2016 12:08 AM PDT

How to set it up to begin with. Like, all temp directories could be put in RAM, but which ones? And how to set up the process of something like "Click once to setup the RAM disk automatically before starting Android Studio", so we can just setup the RAM disk once per session and just forget about it.

And how to make sure we won't lose any data?

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

Questions Thread - May 20, 2016

Posted: 20 May 2016 05:10 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]

Newbie in Android development looking for help

Posted: 20 May 2016 07:05 AM PDT

Hello, I'm currently student in Master in computer science in France and I am in Internship for my formation. I found an internship in a society working for new technologies (connected glasses allowing technicians to be in real time communication with expert a bit like teamviewer...). I haven't really got much training from the company who hired me as intern and I don't really have anyone to ask programming questions to. So far I got told that my mission would be to "develop an app that allows people to detect POIs like Layar for mobiles"

So me and another intern working on this project guessed that the simpliest way to do something satisfying would be to use the Layar SDK to develop the app (since we guess our superior wants to have virtual reality included to detect nearby POIs via camera)

My problem is that my Android experience is very basic (made a game applications with Android for a class so I know a bit of the basic and have used Android studio) and I had never really used any GPS/map using app, so I checked few video tutorials but many of the things that were used in those seems to be decrepated & API 23 permissions makes it really annoying to test app on my AVD. What I am looking for is somewhere (or someone) to ask questions to that could be extremely basic and that could answer a few of them regularly (not always), Stackoverflow etc seems to be more of a site where you'd ask one question on a very particular matter and less questions about "what is the best way to implement a solution for this problem" or less "newbie/stupid" questions, if anyone has an idea what I could do, I'm a bit lost and as I said I don't reallu have someone to ask questions to in my internship.

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

Android Development for the Rural World

Posted: 20 May 2016 02:02 AM PDT

Thanks for reading my news about Google I/O 2016 Day 3 Thread 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.