2

The contacts storage in android is pretty much standardised and is unified among all apps, and accessible depending on the permission level.

However, I need a way to store some contacts which should not be in the standard contact storage space, because it is accessible by all the messaging apps and there is no way to hide contacts from selectively appearing in them, other that deleting the contact.

But, deleting them altogether makes it difficult to identify them during an incoming call.

So, I want to have a way to save contacts that can be avoided from being accessed by all apps, but I should be able to identify them on an incoming call.

How can this be done? Any app or storing in csv file... Any suggestion please?

Please note that any caller identification apps which are cloud based, is not the option I am looking for. I want to accomplish this for contacts I know and have saved only.

  • Afraid there's no way for selective contact access. Even if you'd store them into separate "partitions", it's always the "contacts provider" maintaining them. So you can either forbid or allow an app access to all contacts. Though there might be a telephone app coming with its own contact storage only accessible to itself (technically doable for sure), I don't remember having seen such. But be welcome to cross-check my list. – Izzy Dec 5 '17 at 22:32
  • @Izzy, how difficult will it be to write an app for a complete beginner with only C knowledge? Or is there any other way that this can be done by myself? I have them stored in excel file. I'm only stuck with search and find part. Grabbing the phone number from incoming and later displaying it as a popup can all be done by Automate. – Yaksha Dec 6 '17 at 3:13
  • 1
    Yaksha, I'm no Android programmer so I cannot tell. If it's only for CallerID (which wasn't clear until now), it shouldn't be too complicated – but development questions are off-topic here. Mentioning Automate, someone else might already have written a corresponding recipe even. – Izzy Dec 6 '17 at 8:00
  • @Izzy, I have been able to get it working within Automate itself. Thank you :) – Yaksha Dec 7 '17 at 4:32
  • 1
    Thanks for self-answering (upvoted)! Hope my edit is OK with you :) I'll cleanup the comments here a bit then. – Izzy Dec 7 '17 at 8:05
4

I came up with a solution for this myself. Instead of writing a complete android app, I found out that Automate itself has SQLite function blocks. So I just wrote a flow to accomplish this and it can be found at

http://llamalab.com/automate/community/flows/17889

Preview of that flow:

flow preview
Preview of that flow (click to enlarge)

1

You can store the contacts in .csv there's no problem by converting the default contact backup .vcf file or using applications like contacts to excel. But you know contacts are entities which need fast processing, they are buffered from the /cache partition. Simply because that is a fast memory than EMMC, FAT, exFAT etc. All apps read them from there. There's no algorithm that will ever read the contacts from your /sdcard partition where I'm sure your .csv file will exist. The Contacts app only views the contacts. Similarly how other apps are provided to them. One app called Contacts Provider is the one responsible for serving the stream of contacts from /cache. Since this is a system app it has app links and permissions systemwide. Unless you make it a user app by extracting it, its libraries and classes and recompile it to user app and set the app-links to apps you authorize but still it will be like denying contact access to other apps. So this is impossible.

  • I see you're thinking. That will work. A database of contacts to be retrieved will need an automation application which also integrates query language. Yeah Macrodroid is one application that can automate and which I can use professionally. But it doesn't have the query language thing. Maybe if you get an application that can search within the csv and display the name of the person, Macrodroid can help you retrieve that in a pop-up at call immediately. But if you understand the app Tasker, is a modern heavy automation app one on one which can help you I guess. But I don't understand it much – Thally Ace Dec 5 '17 at 16:30
  • Definitely. Because if you're not going to use query language, you're definitely trying to create the contact names as variables and their numbers as their values. On call reporting the value, it shows the variable name. This will be too expensive to use automation application. But developing an application is not too bad to do. If you want this thing so seriously. That's where I wish android was Windows Computer, the Excel thing and BASIC could be fun – Thally Ace Dec 5 '17 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.