Pricing Request a Demo
Home / Google
Enjoy the best mobile SDKs news, tips & tricks, sent to you by mail

Why Your SDKs May Get You Banned from Google Play, and How to Avoid It

October 7, 2015 6:33 PM

Did you know? Your SDKs can actually get you kicked out and banned from Google Play. Even the reliable ones. It’s not something we often think of, but it’s a thought we should always keep in mind…read on to find out how this may happen, what’s OK and what’s not, along with some things you can do to keep your app off the naughty list.

Getting banned from Google Play isn’t necessarily exclusive to bad guys. There’s no greater nightmare for app developers than losing Google Play’s trust and being banned. Still, the internet is loaded with stories and cautionary tales of app developers that have found themselves out of the game, left to wonder what went wrong.

Google play is updating its policy every now and then and adds more requirements / restrictions. Sure, I could just ask you to memorize the entire policy by heart, but sometimes the blame doesn’t lie with you, but with the SDKs you’ve integrated into your app. Here are some SDK-related violations that you should pay extra attention to:

Ads at the Wrong Time, In the Wrong Place

Google Play imposes some restrictions when it comes to user experience and ads. For example, There are some important rules when it comes to the how, when and where ads are displayed in your app. Users must be able to close them freely, quickly and at ease; They mustn’t be redirected to another site when they hit the desired X button; You’re not allowed to overlay messages or notifications over other apps either. Some monetization SDKs, however, are not exactly following these requirements.

Avoid the Google play banned list by having good ads UX

Ad displayed correctly.
Image source: android newbies

Continue Reading

Android Developer? Here is what to pay attention to when using Google Play Services

September 21, 2015 8:09 PM

Most Android developers use Google Play Services. In a survey we run at SafeDK, we found that nearly 70% of all Android apps have at least one package of Google Play implemented, and often even more than that. From ads to analytics, through support of social media, cloud and push notifications, Google Play Services offer app developers a variety of capabilities, and it’s great. Having said that…there is also a downside to all this goodness.

In order to offer such rich support, Google Play Services module is comprised of many individual packages, and contains a whopping 29,000 method count which is problematic due to the 65K limit issue.

The Unbearable Lightness of Multidexing

Interestingly enough, based on SafeDK’s big data, we found that approximately half of the Android apps out there integrate the full module of Google Play Services, but actually use very few of the packages it contains. Naturally, Android developers would want to optimize their Google Play Services selection…

I’ve written about how to deal with this issue, in a previous post where I provided some insights on how to identify the packages that are right for you. I also touched on the number of methods each package adds to your app. 

But now, Google has released a new version of Google Play Services. And while some things have changed, the bottom line has barely shifted:

  • It still adds a large number of methods to your app.
  • You still must use the large “base” package in order to use any package.
  • You still have to use the entire play services (can’t pick-and-choose) to continue using the deprecated appstate package.

Continue Reading

Will Mobile SDKs Leave an Aftertaste for Android Marshmallow?

August 27, 2015 1:08 PM

After months of waiting, the official new Android SDK is here – Android 6.0 (better known as Android Marshmallow) has been officially released for developers. First unveiled last May at Google I/O 2015, Android Marshmallow introduced some great new features. One such feature is a new permissions model, called Runtime Permissions, and app developers are going to have to make the necessary adjustments to their apps to deal with this new model. But one very important thing they might not be aware of – the code of the 3rd party tools they are using: the SDKs.

Here at SafeDK we’re constantly thinking about them. How they improve the development process and boost apps on one hand, but are the subject of bugs and security breaches on the other. We’re constantly trying to mediate over that gap, putting a little more love and trust into “this love and hate relationship of app developers and SDK developers”, as our CEO Orly Shoavi puts it. So naturally when we heard of the new permissions model, we sighed “finally…” and then quickly came to think “but what about the SDKs?”

Let’s back up a moment and talk about this new permissions model. Android M (planned to be released around the end of Q3 2015) deprecates the concept of pre-approving a long list of permissions during app install, as well as the ‘take it or leave it’ deal apps and users have today. Starting with Android Marshmallow, users will have the ability to selectively choose which permissions to grant, and moreover will be able to revoke permissions in the Settings screen later on, much like in iOS. The app, on the other hand, will get the opportunity to explain why it requires specific permissions, and will no longer be able to rely on them being granted in advance – every single time an app wants to access some service guarded by a permission, it will have to ascertain it has that permission (and gracefully handle the scenario in which the user declines to grant it). Sounds like a big leap forwards for Android, wouldn’t you say?

Continue Reading

The Marshmallows Are Coming: New Permissions Model is Almost Here

August 19, 2015 7:35 PM

Earlier this week, Google ended months of speculations and announced Android M will be decorated with fluffs of Marshmallow. And with the big name revealed, the official version has been released and it’s time for app developers to make the necessary adjustments towards the new version, set to hit mobile devices late this fall.

What adjustments are those? Well, perhaps the biggest and most exciting one is the new permissions model.

Since its’ inception, Android has employed a then innovative permissions approach. Each sensitive component was wrapped with its’ own set of permissions and each application had to both inform the user of what it will access, as well as request his approval for such accesses. Sensitive data like user’s personal information or location, as well access to the user’s own files or phone records, were no longer done in secret behind the scenes. This was certainly a big important step up from the way things used to be (and still are) with computer applications.

However, Android’s permissions model also had a few stings:

  1. It bombarded the user upon app installation with the often long and daunting list of permissions.
  2. It was a package deal – an ‘all or nothing’ situation.
  3. It was an ever-growing mayhem – Many actions were split into several permissions (for instance, read vs. write) and as features and capabilities continued to grow, so did the complex permissions model.
  4. Android displayed its’ own description of the permissions, a description that sometime sounded scarier than it was for the casual user.

With Marshmallow, that’s all about to change. Let’s see what it’s all about…

Continue Reading

When SDKs Update: To Upgrade or Not To Upgrade

August 5, 2015 12:34 PM

SDKs are on the rise, there’s no denying that. They’re a great way for developers to work out the more common pieces of code often found in mobile applications. These SDKs are the kind that will make their product whole on one hand, but on the other won’t be what sets their solution apart from all the rest.

More and more SDKs are being developed, released and integrated into increasing number of apps. The benefits and services offered to app developers become more versatile and intriguing as time goes by. No matter how much you may dread putting someone else’s code inside your app, it’s getting harder and harder to resist these temptations. Especially when developing them yourself may be too expensive and time consuming.

But much like your own app, SDKs are always trying to better themselves by offering new features, fixing bugs or security risks, etc. Which may sound lovely at first, until you realize a service you’re dependent on has changed. And while change may be a positive thing, it can also break things. So what do you do when an SDK offers a new version? Do you automatically upgrade or do you approach it with much more caution, hoping the current version you use will still be supported in the foreseeable future?

Actually, there are no real guidelines. No easy “do’s and don’ts” list. App developers are left pretty much to rely on their gut reaction and their thorough testing. So let me offer you some food for thought when making these tough decisions.

Continue Reading

Reducing Your Method Count: The Google Play Services Edition

June 30, 2015 3:50 PM

Avid Android developers have longed faced a headache-inducing problem with their apps. The number of methods an app can have is limited. Well, it used to be limited. At long last, the good folks at Google provided a solution last October, but it was far from ideal. Though very easy to implement, the multidex solution complicated and prolonged compilation time significantly. Not standing still, starting with Lollipop (Android 5.0), the entire Android virtual machine was revolutionized to offer a much more endurable solution, the kind that even improves on the regular compilation time.

However, for the time being, the Lollipop solution isn’t ideal too. It requires developers to develop against Lollipop only, which could be problematic since most apps want to be compatible with wider ranges of audiences and might fear using features that aren’t available in earlier Android versions. So right now, the Lollipop solution is a good future-Android solution, but might not have much impact in the foreseeable present.

So what can be done in the meantime? We all agree that you shouldn’t give up on features and capabilities, just to avoid reaching the 65K limit. But there is no doubt that the best practice would still be to reduce your application method count.

So how can you still try to reduce your method count without losing that little spark that makes your app special?

Continue Reading

Solving Android’s 65K Limit (Part 2): The Lollipop Generation

June 23, 2015 3:57 PM
 

If you’ve read my previous post about breaking Android’s 65K limit (and if you hadn’t, what are you waiting for?), you’re already pretty familiar with Android’s 65K limit, why it exists and how to solve it. Which means you’ve been itching to know what the future of multidexing has in store (and what does a tooth-fairy-supporting candy-on-a-stick has to do with it).

As small recap to start with, if you will:

Since its’ inception, Android ran a virtual machine called Dalvik. The Dalvik VM ran a compiled file called dex (Dalvik Executable) which has a tiny limitation – even though the file contains the entire code for the application, its id field was limited to 4 hexadecimal digits. So when an application had over 0xffff methods (=65,536 in decimal), the dex file simply could not be created, meaning applications with so many methods could not be created.

That posed a problem as applications became more and more diverse and complex, and as many developers looked to speed their development process by not doing everything from scratch, but by using more and more third-party libraries (SDKs) that help them achieve their goals faster.

Android released a support library which helps you create an application with over 65K methods. In a nutshell, the compilation process to of Java bytecode to dex was enhanced so that once the limit is reached, a secondary dex file is created. The support library then offered a static method Multidex.install which is called when the app is being launched and tells the class loader to look for methods in places other than the one dex file is expects.

However, we’ve seen the solution is not ideal. Issues ranging from prolonged compilation time to a static process repeating every single time the app is launched made the multidex solution a workaround compromise rather than something Android developers could truly trust. What might be the most burning issue is the lack of ability to predex (compile the not-likely-to-change parts of your app to dex only once; Again, for more information, take a look at part 1).

Continue Reading