Showing posts with label androiddev. Show all posts
Showing posts with label androiddev. Show all posts

2016-03-02

Privacy: Programmatically Identifying Developer Devices

Apps can programmatically identify likely device(s) of app developers.

It's due to the fact that app developers usually install their app many times. And, it's possible to watch for those app installs in Android.

Implementing an app that takes advantage of this requires ZERO permissions.

So, I've created two working proof-of-concept apps: One to programmatically identify developer devices, and one to identify those kinds of apps and stop them. Both are open source and can be found on GitHub, and the later one can be found on Google Play.

I'll explain shortly how this is done.



Imagine, if you are an app developer, then your device(s) can be programmatically identified and have special code ran for them and nobody else will experience the same issue or app changes.

2015-03-02

Level Up - Android Dev: How to get started with Robolectric (Android testing)

I'm finally getting around to trying out a few different libraries that claim to make testing Android apps easier. First up is Robolectric.

For this quick walkthrough, I'm going to show how to start from scratch. You'll need no prior knowledge except for how to make a regular Android app.

In my GitHub repo: How to get started with Robolectric

~ Danial Goodwin ~



2015-02-13

Level Up - Android Dev: OneTimeAlertDialog = Android AlertDialog that only shows once for a given key

Every single one of my apps need something like this. It's boring to explain in more details what's traditionally needed to make sure an AlertDialog is only shown once. Now, with this OneTimeAlertDialog.java, it's much easier to create new AlertDialogs that are only shown once.

/** Prompt that is only shown once to user. */
OneTimeAlertDialog.Builder(this, "my_dialog_key")
        .setTitle("My Title")
        .setMessage("My Message")
        .show();

For something I use so often, I was surprised to not find a similar project on GitHub. So, I've added it: Android OneTimeAlertDialog


~ Danial Goodwin ~



2015-01-17

Level Up - Android Dev: How to get started with AndroidAnnotations (easy) (and build Chuck Norris app)

AndroidAnnotations is an open source framework for Android. Basically, you provide Java annotations for things, and the framework will auto-generate the necessary boilerplate code so you don't have to write it yourself. Runs at compile-time! (Read: No reflection or startup time impact) And, there's a lot of code AndroidAnnotations saves you from writing manually.

For example, want to run something in a background thread? Annotate the method with `@Background`. Want to run something in the main/UI thread? (rub some bacon on it) Annotate the method with `@UiThread`.

In this article, I provide a quick walkthrough for creating a very simple Chuck Norris facts app. I'll assume that you already have basic Android knowledge (and using Android Studio + Gradle). Then, at the end, I'll explain in more details some issues/gotchas I ran into while using AndroidAnnotations for the first time, and mention other goodies.

Getting started..