Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
kitten smoothie
Dec 29, 2001

How is a screen like this implemented - as a sectioned ListView? The map is not live, it is a static image presumably generated by Google's static map API.

Adbot
ADBOT LOVES YOU

kitten smoothie
Dec 29, 2001

Doctor w-rw-rw- posted:

I did something like it by writing a custom arrayadapter and overriding getItemViewType, getViewTypeCount, and getView. I ended up with a little messy (but as clean as could be reasonably expected?) hack that required some hacks to make context menus or listfragments work, but I forget how much of this was also because I needed a special view type at the bottom for lazy-loading.

Gotcha, I'll give that a try. Thanks.

kitten smoothie
Dec 29, 2001

Moosechees posted:

So, the only remaining piece of the puzzle is push notifications. I assume Google Cloud Messaging is the way to go, right? If so, that seems pretty simple.

You may also find Parse to be helpful for push. Their free plan gets you a million pushes a month which could well get you covered. It looks a lot simpler to implement in your app and your backend than the Google version; the tradeoff of course is you end up having to pay if you get popular.

https://parse.com/docs/android_guide#push

kitten smoothie
Dec 29, 2001

Thermopyle posted:

You'll probably want to read a Java book first, but it's certainly possible.

As long as you're on Amazon buying a Java book, buy this too.

http://www.amazon.com/dp/ASIN/1118102274

kitten smoothie
Dec 29, 2001

It took a year and a half but some jackass has posted a paid app of mine to half a dozen of those APK share sites.

Is the license service worth implementing or is that something that these guys have figured out how to work around?

kitten smoothie
Dec 29, 2001

Yeah, I was reading through the license manager docs later last night and realize it's way too much time for me to implement something that will probably be just as easily broken.

I just need to look on the bright side. It's a $2 mobile radio app I made for a buddy of mine's station, and the more listeners there are, the more he can claim to his advertisers and make his rate card look better.

I have an Admob-enabled free version of the same app out there, and Admob honestly has paid crap for me. So the person who pirates it probably would have otherwise been one of the tons of people using the free version and barely earning me peanuts on it anyway.

kitten smoothie
Dec 29, 2001

duck monster posted:

He needs to make sure he can give an accurate account of how many actual users he has. We had all sorts of problems because we where patent licencing G729 , and the people we where licencing from where grumbling about us having to pay patent fees for the unlicenced users. We where able to eventually convince them that we where not liable for pirated copies, but it definately harmed a business relationship with a company we had worked *hard* to get the licencing up for. The company sublicenced G729 rights without requiring the insane minimum sales requirements of the major patent pool ($100K minimum) but didn't for mobile devices. We had worked with them to get their pool into a sane proposition for mobile licencing, but when we started getting smashed with piracy they started to question if *we* where being honest. What a fuckup.

So with Radio advertising, advertising agencies can get pissy about unverifiable streams, and if you couple this with the fact the RIAA might still want its pound of blood for music licencing fees regarding the pirate copies you still might hve a problem!

We have just as many, if not more, people listening from Stitcher, TuneIn, iTunes, and MP3-enabled shelf systems as we do the mobile app. So in order for an accurate accounting we look at what our streaming server is actually spitting out and how many clients are connected for how long. On that end it doesn't matter whether it's a warezed copy of my app, legit copy, iTunes or whatever else.

And don't even get me started on streaming royalties; we could be here all day :v:

kitten smoothie fucked around with this message at 16:17 on Oct 22, 2012

kitten smoothie
Dec 29, 2001

:siren: Actual MapFragment support from Google! :siren:

kitten smoothie
Dec 29, 2001

Gavinvin posted:

On a side note, I have found on my own phone (Samsung Galaxy S II) on ICS, that when using the default mail application, you cant use a email address that contains an apostrophe. I'm pretty sure there probably an exploit there that could be abused with that, but for such an important application, on a well known device, on the most recent OS they provide, to have a simple and common escaping issue with apostrophe's is pretty embarrassing.

Today I learned apostrophes in email addresses are perfectly valid per RFC822. Hopefully some other day Samsung's developers will.

kitten smoothie
Dec 29, 2001

Trying to get some numbers together to do my taxes. I love how the payout & sales reports in the Google Play publisher console totally do not agree in any way with the payout and sales reports in the Google Checkout console.

kitten smoothie
Dec 29, 2001

Glimm posted:

AnDevCon Boston (28-31st May) looks fairly promising, kind of pricey at $1395 a ticket.
Yeah, my 3-year-long streak of I/O attendance has been broken this year.

This AnDevCon looks like it could be pretty good, at least considering Jake Wharton and Mark from Commonsware are on the speakers list. I might have to consider this one.

kitten smoothie
Dec 29, 2001

http://developer.android.com/about/dashboards/index.html

So they've changed the way they count device versions. Before it was based on devices' automatic check-ins over a 2-week period, so basically every device out in the field. Now it's based on devices where the user actually opened the Play store.

I can't tell if this is goalpost-moving or if this actually is a better metric. It does seem to more accurately reflect the user base of one of my apps, for whatever it's worth.

kitten smoothie
Dec 29, 2001

Have fun. It's been 2 months since registration and I am still pissed that my 3 year streak of I/O attendance got broken this time around.

kitten smoothie
Dec 29, 2001

TestFlight is also an option, given they added Android support.

kitten smoothie
Dec 29, 2001

There is a lot of crap on Google Play, stuff like this and this, and that's not even counting the continuous run of counterfeit apps (how many fake "Temple Run" apps made it to the store?). Or, apps that are stupidly buggy or just outright crash on launch. That would never fly on the App Store and this crap makes Android look bad too.

I would love to see some sort of manual curation option on Android and have some kind of way to designate curated apps, in addition to prioritizing them in the search results. You could fill the curated pool in the beginning by grandfathering in apps that have a high ratio of 4 and 5 star reviews relative to downloads, and otherwise, charge a fee to submit a new app into the curated portion of the store and get that extra designation on your app.

kitten smoothie
Dec 29, 2001

http://android-developers.blogspot.com/2013/07/android-43-and-updated-developer-tools.html

quote:

Last, we’ve updated the Android Support Library (r18) with several key APIs to help you build great apps with broad compatibility. Most important, we've added an Action Bar API to let you build this essential Android design pattern into your app with compatibility back to Android 2.1.

So is there any reason to use ABS anymore? I have an app I want to overhaul and I'm curious if I should bother with ABS or if this should nail what I need.

kitten smoothie
Dec 29, 2001

Doctor w-rw-rw- posted:

Mobile connectivity is generally poo poo. Sacrificing usability to do right by your paying users in this way won't net you any more money, and it destroys your freemium funnel. That's two pretty lovely alternatives. Is there a third?

Maybe a happy medium is that if AdMob is unavailable, you also check if you can DNS resolve play.google.com and get a route to it. Only display the "buy the IAP" banner if both conditions are true.

That way, if your user is really, truly offline, then you don't bug them. After all they can't buy your IAP if they don't have an internet connection.

On the other hand, if they're a rooted user who blackholed AdMob in their /etc/hosts, and they're butthurt because they're still seeing a banner, then screw them.

kitten smoothie
Dec 29, 2001

Android Studio question: I've added the support library to my project's build.gradle file. I changed everything over and now things build and run on 2.3, so I'm building against the support library properly.

But Android Studio is giving me red text for all the classnames from the support library. Clearly I'm missing something here and there's some search path that IntelliJ wants?

kitten smoothie
Dec 29, 2001

Glimm posted:

Maybe a dumb question, did you close and re-launch Android Studio? Do a ./gradlew clean/assemble?

I think recent updates were supposed to make this unnecessary, but earlier versions required closing/re-launching Android Studio after adding a library.

Not a dumb question, in fact it was the correct answer. Thanks.

I'm all caught up with Android Studio updates, so I guess they haven't fixed this. This is my first time using this, and even in spite of weirdness like that I'm still preferring it to Eclipse.

kitten smoothie
Dec 29, 2001

I had never heard of that one before. We use Robotium which looks similar. One of our QA guys has set up a Jenkins slave box on a Mac mini that has half a dozen different phones plugged in, so when you kick off a build it runs the instrumentation tests on every phone simultaneously.

kitten smoothie
Dec 29, 2001

Literally Elvis posted:

(I tried declaring those initially below my other MainActivity variables, but it didn't seem to work)

You declared them, but where did you actually initialize them? Should've worked if you declared them as instance variables and then initialized them in onCreate().

kitten smoothie
Dec 29, 2001

One more point, sorry for the double post:

I see you used some of the boilerplate from Android Studio's code generation for Activities, which sets up a Fragment for you, but then you've implemented all your logic and views in MainActivity instead. You've still got this in the onCreate(), and the generated PlaceholderFragment class is defined at the bottom.

code:
if (savedInstanceState == null) {
            getFragmentManager().beginTransaction()
                    .add(R.id.container, new PlaceholderFragment())
                    .commit();
        }
I'm actually kind of surprised it still works with this there, given your top-level RelativeLayout with all your other UI elements is the one with id "container." I would've assumed this would've caused problems.

It seems like the new party line from Google these days is that you should use Fragments for your UI and have the Activity be just dumb shells to host them, because as you start making more complicated interfaces and supporting phones and tablets it makes it easier to deal with. So it's a good idea to learn how to work with Fragments properly, but for something this simple it probably doesn't matter that much - however, you'll just want to get rid of the Fragment related code.

kitten smoothie fucked around with this message at 14:25 on Apr 2, 2014

kitten smoothie
Dec 29, 2001

TheReverend posted:

I don't see how much it is. It's usually a lot, yeah?

$900. If you apply for a ticket and are selected, they will automatically charge your credit card.

kitten smoothie
Dec 29, 2001

I/O ticket confirmations are reportedly rolling out now. May take a while since they have to charge four and a half million dollars worth of credit cards :v:

kitten smoothie
Dec 29, 2001

In the past there have been code labs where content has not been streamed or published after the fact.

The labs were pretty helpful for learning some concepts; maybe they were just beefier versions of the tutorials published on their website but when I have paid $1K to be there I am going to be a hell of a lot more motivated to sit there and learn jt than if I am at home.

They've also got office hours with the devrel people and product teams so you can take nitty gritty questions to people who are in the best position to answer.

The lunch meetups are handy, in that on more than one occasion I have serendipitously sat down next to someone who is the maintainer of an open source component I used, or was on the development team of an app that I really liked and wanted to know more about how they put it together.

I have gone 3x before and this sort of stuff is worth the price of admission. I really could not care less about the free stuff. Especially considering I used to do mobile work on a hobby/freelance basis, but now that I am on a mobile team at a publicly traded company and they are paying my way, the free poo poo basically belongs to them anyway.

I guess that's really the draw to any of these conferences, given WWDC is basically the same idea except for free poo poo and they don't stream immediately.

kitten smoothie
Dec 29, 2001

Uncomfortable Gaze posted:

Rejection emails are going out, so if you haven't seen anything yet you're probably SOL. This is the third year in a row I haven't been able to get a ticket.

Yep. Got my rejection just now. I went 2010 through 2012, and then have lost out since then.

They really need to jack up the price to maybe $1500 and stop handing out free poo poo.

kitten smoothie
Dec 29, 2001

Sereri posted:

Your code will not be visible to an end user unless they open up the apk (not that easy if distributed via Google Play) and extract it.

While there's no simple "view source" that any casual user could see, it's still fairly easy on a rooted device to extract an apk if someone with technical knowledge (or the ability to run a script) wants to get at your apk and the code.

You also may as well assume it is a certainty that before long your apk will get extracted and wind up on various sharing sites where people can bypass the Play store.

Even if you write it natively and obfuscate your code, your assets are still going to be out there in the clear for people to steal. So either way you're somewhat exposed, you just get to pick how much risk you feel like taking.

kitten smoothie fucked around with this message at 14:49 on Apr 29, 2014

kitten smoothie
Dec 29, 2001

Yep, credentials are not terribly hard to de-obfuscate, case in point:

http://blog.trustlook.com/2014/03/31/critical-vulnerability-bad-practice-leads-to-aws-credential-disclosure/

If you're using AWS and need to include a secret in your app, there's the Amazon token vending machine service. It'll allow you to create scoped AWS tokens on a per-user basis rather than giving away free bitcoin mining services to the internet by bundling the tokens in your app.

kitten smoothie
Dec 29, 2001

GorgeOnMySyphilis posted:

What about more sensitive information such as a private key which could be used to encrypt data between your app and a server?

Well, in this particular example, you shouldn't be bundling critical private keys with the app anyway.

You generate one keypair for the server, and distribute its public key with the app. Any data you transmit from the device gets encrypted with that public key. You also generate a keypair on the device for the user, and send the server the public key from that pair when the user logs in. Any payloads sent back in server responses are encrypted with that public key. Set up this way, if you reverse-engineer the app you get a key that can be used to encrypt data for the server's eyes only, but nobody can else can decrypt it. You can't reverse the app and get any keys to harm other users.

Bottom line is don't bundle anything that can't be taken by a third party and used to cost you money, impersonate you, or compromise another user's data.

A URL should not be sensitive; authenticate any requests to it. Don't bundle an authentication credential for it with the app, you should register per-user credentials and use those.

If you need access to resources on Amazon, use their service to download scoped credentials that are specific to the user and use case (they can post their pictures to S3 and nobody else can read them, but they can't spin up EC2 instances).

If there are other services who have API keys that can cost you money, proxy them via an authenticated service of your own if you can. If you're making an app that texts other users via Twilio, don't bundle your Twilio key in the app, for example. They should need to login to your backend (so you can revoke their account if need be or apply rate limiting) and your backend should make the Twilio call on their behalf.

kitten smoothie
Dec 29, 2001

"Why developing for Android is challenging," explained in video vignette form.

kitten smoothie
Dec 29, 2001

In Results' onCreate method:

This isn't the resource ID for a ListView. It's not even a resource ID for a view at all, which is why it's returning null. That is why your list.setAdapter call is blowing up.

code:
list = (ListView) findViewById(R.layout.list_generated_pokemon);

kitten smoothie
Dec 29, 2001

From the stories out there on the blogs, appeal requests are nearly immediately denied, and resubmitting the app will be another strike against you. Three strikes and you are banned for life from the store.
They warn you not to create additional Google accounts and resubmit because those are subject to banning on sight. With the kind of data they have, they probably have lots of analysis procedures for identifying accounts held by the same person.

kitten smoothie
Dec 29, 2001

LeftistMuslimObama posted:

Is there a site or book that has some good example projects to build up my Android skills? The Google tutorials definitely explain the api well, but the I feel like I need to do a few projects that build up the complexity so I can get a better feel for how it all fits together. I've always sucked at just making up projects for myself when I'm not programming something I actually need.

The Big Nerd Ranch book seems pretty good, I think. http://www.bignerdranch.com/we-write/android-programming

kitten smoothie
Dec 29, 2001

Tunga posted:

However, you definitely shouldn't use this to constantly pop up an Activity until something happens, that would be terrible.

Yeah, that sounds like the mechanism this piece of ransomware uses. Background service that just waits 5 seconds after an activity goes away and spawns a new one.

http://labs.bitdefender.com/2014/05/reveton-icepol-ransomware-moves-to-android/

kitten smoothie
Dec 29, 2001

It seems weird that they're hardcoding an address for the "from" field (which is what's assigned in row 37) when I would assume the "fromList" would have the appropriate info to put there.

kitten smoothie
Dec 29, 2001

My team just set up various emulator run configurations in the project in IntelliJ and named them according to how the AVD should be configured. The AVD name you are to use when configuring is the same as the run config name. For instance, "Nexus4-18-x86" for a 4.3 device using the Nexus 4 profile and x86 system image. We support 4.0.3 through 4.4, so we did this scheme run configs from API level 15 thru 19. Then that got committed to git since it's part of the project config in the IDE.

If you join the team, then you just set up your AVDs based on that, name them the same way, and then you generally never end up screwing with them again otherwise. It's sort of on your honor that you set up the AVDs correctly, but it's not like it's really prone to problems since it's something you're not going to be changing going forward. We've got a team of probably eight developers and none of us have had any issues with this process when people come on board.

kitten smoothie fucked around with this message at 16:37 on Aug 11, 2014

kitten smoothie
Dec 29, 2001

I really wish Google would just buy Genymotion already.

kitten smoothie
Dec 29, 2001

Using a script to install packages just sounds like it would be trouble later since you'd have to have ADB (and appropriate drivers, if a Windows machine) installed on it to really trigger an install. Do you want to have to support setting up ADB on a new computer when they want to use a different one as the "home base" machine?

I'd just go for your initial approach of a beta group. If you post an update, just tell them to get the tablets on a wifi network and update them on the store.

kitten smoothie
Dec 29, 2001

Karthe posted:

On that note, is there a downside to distributing it through MY Play Store account versus having them pony up the $25 for a developer account of their own? Using my account would obviously be easier, but maybe that's integrating things too closely? Or maybe it's another avenue for a monthly revenue stream :clint:

I'd have them sign up and pay the $25, and add you as an authorized user on their Play Store distributor account so you can upload binaries.

Adbot
ADBOT LOVES YOU

kitten smoothie
Dec 29, 2001

Yeah, they're iterating like crazy on Android Studio and it's definitely perfectly fine for Doing Real Work.

You might also want to look into Retrofit for your REST stuff.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply