Tag: Android App

READ_CONTACTS Permission Before and After Marshmallow

The READ_CONTACTS permission is required if you look up a contact (using the code below) on a pre-Marshmallow device (API 23). But, on Marshmallow or above, you don’t seem to need READ_CONTACTS even though READ_CONTACTS is a dangerous permission.

I don’t see why these two cases should be different.

In particular, if you launch the user’s contacts app with this:

val intent = Intent(Intent.ACTION_PICK, ContactsContract.CommonDataKinds.Phone.CONTENT_URI)
startActivityForResult(intent, RC_CONTACT_LOOKUP)

and then read the contact’s phone number with this in onActivityResult:

RC_CONTACT_LOOKUP -> if (resultCode == RESULT_OK) {
    lateinit var cursor: Cursor
    if (data != null) {
        try {
            cursor =  applicationContext.contentResolver.query(data.data,
                    null, null, null, null)
            cursor.moveToFirst()
            val column = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)
            val phoneNumber = cursor.getString(column)
            contactButton.text = phoneNumber
            errorTextView.text = ""
        } catch (exception: Exception) {
            Log.e(tag, "Could not query column db", exception)
        } finally {
            cursor.close()
        }
    }
}

it won’t work in the pre-Marshmallow case unless you’ve required the READ_CONTACTS permission in the manifest. But, for the Marshmallow case, you don’t need to request it (which you would do, of course, at runtime on an as-needed basis because it’s Marshmallow).

Comment

To Change the Option Menu’s Text Color and Typeface, I Got Rid of the Whole Thing

For a Halloween mapping app I was working on recently, I wanted to change the color and typeface of items in the standard options menu.

After trying some obvious things, like experimenting with text/color/font related attributes on the ‘item’ tag and monkeying around with the app’s theme, I found that I do not know how to do this.

So, I looked at this, this, this, and this. But, I never quite managed to change both the color and the typeface on the individual menu items. (Maybe I could have created a custom class that merges the features of a ForegroundColorSpan and a TypefaceSpan and a SpannableString or something, but I ran out of patience.) It started to look like more work than I wanted to do. And I’m not a big fan of the options menu anyway.

So I gave up on the options menu and started to look for something else. Eventually, I found Nightonke’s Boom Menu. Compared to most free android libraries hosted on GitHub, Boom Menu is awesome. Changing the text color and typeface are EASY. And the documentation is solid.

It was easy to change a Boom Menu button’s text color and typeface. I read the doc pages. Then I was like, Boom:

TextInsideCircleButton.Builder builder = new TextInsideCircleButton.Builder();
builder.typeface(ResourcesCompat.getFont(this, R.font.my_custom_font));
builder.normalTextColor(R.color.colorAccent);

Thank you, Nightonke!

Comment

Looking Forward to Final Release of Android Studio 3

Over three months ago, when the android team first announced Android Studio 3 , I installed it alongside Android Studio 2. But, after I ran into some mysterious bad behaviors, I decided to uninstall both versions. That solved the problem. But, I ultimately decided to reinstall only version 2 and wait for the stable 3.0 release to do a complete transition. I figured it would hit RC status pretty fast.

Today I noticed that the android team has withdrawn the beta 3 version..

Due to an issues with the Android Plugin for Gradle in Beta 3 (64527520), we’ve pulled it down and recommend that you not accept the update. If you already did, you can go back to Beta 2 by downloading here.

It looks like they have fixed a recurring bug in the upcoming beta 4 version. Hope that’s out soon. Still looking forward to all the nifty new features.

Comment

Browzacado Is Dead

Sorry. The Google Play Store has informed me that my ad-free, free, non-profit avocado browser app for Android violated the terms and conditions of the store. They have suspended the app.

I meant neither to offend nor to exploit UC Riverside’s excellent avocado database. I only wanted to make it available in a more convenient format for mobile devices. I wish the fine team that created and maintains the UCR Avocado database all the best. I encourage anyone from that UCR team who is interested in having UCR take ownership of the app’s Android Studio project and source code to contact me to facilitate a transfer. Cheers.

Moving on …

View 1 Comment

Browzacado

UPDATE: On 02/11/2015, Google removed this app from the Google Play Store.

If you’re interested in identifying different avocados or avocado trees, Browzacado is a free, ad-free android app I wrote to make it easy to display a list of avocado varieties by search criteria.  It’s basically a mobile friendly front-end to the excellent, public avocado web pages published at UC Riverside.

You can filter a listing of avocado varieties by any one of the following criteria:

  • Color When Ripe
  • Parentage
  • Flower Type
  • Shape
  • Skin Texture

The app downloads an appropriate and informative image when you click on an avocado variety in results listing.

 

View 1 Comment

Browzacado – Privacy Policy

This privacy policy governs your use of the software application Browzacado (“Application”) for mobile devices that was created by Albert Braun. The Application is designed to provide information about avocado varieties based on user selected criteria.

User Provided Information

The Application obtains the information you provide when you download and install the Application.

Automatically Collected Information

The Application collects certain information about the way you use the Application, including the URLs of avocado related pages it downloads for you.

Does the Application collect precise real time location information of the device?

This Application does not collect precise information about the location of your mobile device.

Do third parties see and/or have access to information obtained by the Application?

No. But the app will make requests for avocado related content to unrelated websites provided by organizations with which we have no relationship. Those websites may or may not collect information about the requests.

What are my opt-out rights?

You can stop all collection of information by the Application easily by uninstalling the Application. You may use the standard uninstall processes as may be available as part of your mobile device or via the mobile application marketplace or network.

Data Retention Policy, Managing Your Information

The Application itself may retain User Provided data for as long as you use the Application and for a reasonable time thereafter. Please note that some or all of the User Provided Data may be required in order for the Application to function properly.

Children

We do not use the Application to knowingly solicit data from or market to children under the age of 13 or anyone else.

Security

We are concerned about safeguarding the confidentiality of your information. We provide physical, electronic, and procedural safeguards to protect information we process and maintain. For example, we limit access to this information to authorized employees and contractors who need to know that information in order to operate, develop or improve our Application. Please be aware that, although we endeavor to provide reasonable security for information we process and maintain, no security system can prevent all potential security breaches.

Changes

This Privacy Policy may be updated from time to time for any reason. We will notify you of any changes to our Privacy Policy by posting the new Privacy Policy at http://www.albertcbraun.com/browzacado-privacy-policy/.

Your Consent

By using the Application, you are consenting to our processing of your information as set forth in this Privacy Policy now and as amended by us. “Processing,” means using cookies on a computer/hand held device or using or touching information in any way, including, but not limited to, collecting, storing, deleting, using, combining and disclosing information, all of which activities will take place in the United States. If you reside outside the United States your information will be transferred, processed and stored there under United States privacy standards.

Contact us

If you have any questions regarding privacy while using the Application, or have questions about our practices, please contact us via email at browzacado@albertcbraun.com