Developing Android Apps

Subscribe to Developing Android Apps feed
News for Android developers with the who, what, where when and how of the Android community. Probably mostly the how. Here, you'll find: - News for Android developers - Thoughtful, informative articles - Insightful talks and presentations - Useful libraries - Handy tools - Open source applications for studyingDeveloping Android Apps
Updated: 21 min 22 sec ago

Requesting Suggestions for Layout Design (send links)

21 min 32 sec ago

I am an old coder, but new to Android.

I finally took the plunge and barrelled through a course I bought, and now I can effectively CODE for Android.

The XML/Java framework that I initially avoided, now makes a lot of sense and I'm really enjoying it.

However, once I set the books(vids) down and went to make a full app, I realized my course had neglected nearly any mention of layouts and design principles. In fact, the very old examples used only Relative Layouts and gave little to no understanding of the concepts involved. Now I find myself fighting with things I can easily conquer in websites (responsive css etc), are causing me lots of headaches during UI design in Android.

I realize I am lacking in the fundamentals of Android specific layout usage, I've been googling my tail off but so far have not found many good resources. I joined this sub, and while they probably exist, I have not found any gems yet (I looked!). I am hoping you guys wont mind if I cordially request a directional nudge.

Does anyone have any links to tutorials for layouts and design specifically that they found particularly helpful?

If this post is out of line, please let me know and I will remove it. I'll be reading as much of this sub as I can either way.

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

Pokemon GO map style implementation in Android

2 hours 10 min ago

Hi, i want to implement the same pokemon go map style in android,

we have a game that is OpenGL ES 2.0 based and we want to copy their map style wherein there is a character standing in a 3D map.

Do you guys have any idea, resource, links and books that i can study about this?

Thank you in advance.

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

Has anyone released their app without ads, but ended up putting ads in their app after it gets more downloads?

Tue, 06/19/2018 - 23:21

If so, how did it affect the downloads and/or ratings?

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

Anyone know of a free bar code number lookup api?

Tue, 06/19/2018 - 18:40

I've had a google around but most of them are pretty pricey. I'm probably asking for a lot here but figured it was worth an ask!

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

How do I prevent my app from crashing when it enters the background?

Tue, 06/19/2018 - 16:37

(Using Android Studio)

My app runs fine, up until the point where I exit the app (not close it) and it ends up in the background. I get "Application has stopped" whenever this happens, and in Logcat i always get a NullPointerException.

Is there a way pause the app 'as is' on exit without crashing, then when the app resumes (user opens app from background), the app continues executing where it left off?

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

Native ad network mediation

Tue, 06/19/2018 - 16:34

I'm trying to monetize an app as much as possible without inhibiting used experience too much.

We've settled on native ads over banner ads because we've been told that the rates for native ads are much higher than banner ads (if there are other ways to monetize apps that .

Has anyone found a really good mix of native networks to use? Which ad servers have the most integrations?

Also, if you have any other recommendations on how to monetize in way that doesn't hurt user experience too much, I'd love to hear about it.

Thanks!

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

Space Themed Starter

Tue, 06/19/2018 - 15:46

Not sure if I can post this, and I apologize if I can't, but I started this as a plan to create a Space Themed RSS reader utilizing the NASA RSS feeds. My deployment and commitments got a little in the way. I put it on github in the hopes that someone will make something awesome

SpaceFeedr

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

Can I put a link to my previous app inside my new app?

Tue, 06/19/2018 - 14:58

I just submit my new app. I put a button that links to my previous other apps, but I got rejected. Google said that this button is a deceptive ad.

So, I am wondering. Am I allowed to do this? Is there a way to do it properly? Because I saw many apps have some kind of more app button.

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

Splash screen, routing and Navigation Arch question

Tue, 06/19/2018 - 14:49

I'm working on an app (MVVM with Arch components) where I'm testing the new Navigation Arch library. Pretty much I got the hang on it. In the end I have something like this: SplashFragment: the start destination. Check if the user it's already logged and pull the user information from the DB. from here I have to navigation conditions:

  1. RegistrationFragment (it;s more a login, since there's no registration) -> Main Section Fragment (which it's inside a Bottom Navigation View with thow more sections on it). And
  2. Main Section.

I was confident with this navigation graph until I stumble upon this post from Ian Lake, where in the comments sections He mentions that you shouldn't have a Fragment only to show a Splash image; you have to use the application theme to do it. I get the idea of it, that on navigation you need a solid start destination.. but the catch in my case it's that before I go to the main section, I need to pull the user information from the DB and then pass it to the Fragment, so I pass that responsibility to my "SplashFragment" which pull the information from the DB and pass the user model to the activity view model, so all the fragments can pull that information from it...

So in the end my doubt it's, do I follow and pass the responsibility for routing/pulling the user information to my main fragment. Or do I keep my current schema where I have a single fragment that it's in care of the routing?

In the end, I implemented the correct way to show the splash screen (using a theme), but my splash fragment it's still there, showing the same splash image while it pulls the information from the DB.

I just need a different perspective on it...

Thanks!

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

Libraries for managing a subset of contacts

Tue, 06/19/2018 - 14:23

I want to allow a user to pick & save a list of contacts, but for each contact only save the phone numbers & email addresses the user wants, and not all of those for each contact. I would like the user to be able to edit these groups after initial selections, of course. The app will be used to send a short message (SMS &/or email) to all selected recipients.

Example: The user has contacts named Alice, Bob, Carol (and others). Alice & Bob both have both personal cell and work phone numbers, as well as personal and work email addresses. Carol has a home phone (landline) and a cell phone, and no email address.
The message should be sent to Alice's personal cell phone & personal email address, Bob's work cell phone & personal email address, and Carol's cell phone.

Are there any existing libraries that could help with building such a system? I've found Codinguser's Android Contacts Picker but that only supports phone numbers. I suspect this use case has come up before, but it seems surprisingly difficult to find a good way to accomplish it. I'd rather use an idiomatic method than hack something together & rewrite it later.

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

Sunsetting React Native at Airbnb

Tue, 06/19/2018 - 13:17
Categories: Android, Linux

With all of the iot devices using wifi, why does android make managing multiple connections so difficult?

Tue, 06/19/2018 - 12:19

I have been working with these iot devices that create their own access points (not wifi direct compatible), and the android smartphone must connect to one of these access point to read data from the device. The problem is that I also need to access the internet for other parts of the application and should easily be able to do this over mobile data. This seems like something that should be super easy to do considering how many iot devices nowadays, but it is really difficult to find documentation on how to do these nonstandard connection setups. I'm not super experienced with android, so there may be something really dumb that I am missing, but it is truly frustrating how difficult it is to do something like this that seems like it should be easily doable.

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

Implementing Gamepad Support

Tue, 06/19/2018 - 12:17

I've been all over Google looking for some kind of tutorial or guide, but I haven't been very successful. I am trying to add gamepad support to my app. I want to be able to pop up a dialog where a user is prompted to press a button to associate with an app function. Of course, the dialog would ask for the next input until it's done.

I was hoping to find a library or tutorial that could help me out. I am lost. The most I've found is Android's little guide on it.

https://developer.android.com/training/game-controllers/

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

typedArray.getWhatever() will actually never return a default value. Is it flawed?

Tue, 06/19/2018 - 12:11

There is something I don't understand when I want to obtain the values of styles defined in styles.xml. Either this is a bug or I have missed something.   

My issue is that I have created a library in which you can style a view by making a style in styles.xml and its very important that the library falls-back to the default values if users haven't used a particular attribute in their style. So if colorBackground attribute hasn't been used, then colorBackground should just fallback to another default value. 

Which is what you think will happend when using this line typedArray.getColor(R.styleable.TextViewAttr_android_colorBackground, Color.BLACK); 

But it won't ever return you Color.BLACK instead you will get the colorBackground from the App theme returned!  

Let me reproduce the issue with some small code snippets for you.

1) Create an attrs.xml file:   <resources> <declare-styleable name="TextViewAttr"> <attr name="android:colorBackground" /> </declare-styleable> </resources> 2) in your styles.xml create a style:  

We wont actually use the attribute, thats why it commented out. We are demonstrating here that if the values is not found or defined then we hopefully get the default value returned

<!--<style name="TextViewStyle">--> <!--<item name="android:colorBackground">@color/colorAccent</item>--> <!--</style> 3) Obtain values fom the style TextViewStyle  @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TypedArray typedArray = obtainStyledAttributes(R.style.TextViewStyle, R.styleable.TextViewAttr); //Now lets get colorBackground defined in our style. //If not found we should logically have Color.BLACK returned instead int backgroundColor = typedArray.getColor(R.styleable.TextViewAttr_android_colorBackground, Color.BLACK); TextView textView = findViewById(R.id.textview); textView.setBackgroundColor(backgroundColor); typedArray.recycle(); } submitted by /u/mxxxz
[link] [comments]
Categories: Android, Linux

Pages