How to set my contacts application as the default? - android

Is it possible to replace Android's default contacts app? I want my custom app to load in place of the default contact application.
If this is possible, could you explain how this can be accomplished? If not, why? The default keyboard can be changed, why not an application?

This is for the user to decide. Your application needs to be able to receive the Intent for picking an item from the contact list (see this question). The user will decide then, if he wants to use your application as the default one.

Related

Content availability. Android

I have an application where the user can add quotes.
I'm using Room for data storage.
I want to make it so that the user can add a quote and it would be visible to other users of the application.
Questions:
How can this be done correctly?
How to open access so that all users can see, not just you?
Thanks!

Android share menu : apps ordering

I made an Android app which can receive text via ACTION_SEND intents from other apps. However, when I try to share content from another app, my app is in the bottom of the long list of available apps. It's not alphabetically ordered because my app begins with "A". So how can I do to raise the position?
The order of options is controlled by the UI showing those options. That might be a system-supplied UI (e.g., platform default chooser) or an in-app API (e.g., ShareActionProvider). You have no means of guaranteeing your app's position in those options in either case. Whether they use alphabetical order, frequency of use, or other criteria is up to their developers, not you.

Get share content through accessibility in android app

I have an android app, which lets people share content from other apps to it. When it receives the shared data, it looks for the URL in the shared text and fetches the page and does processing on the data fetched. This is designed with specific purpose and not a generic for all apps.
It works fine, except that people have to click the share icon and then choose our app name. With accessibility we can reduce this work for the users. We are able to get the text displayed in the app.
Is it possible to get the content which we would get if we were to click the share button.
Or
Is it possible to trigger the share button and choose our app without disturbing the user in anyway
You could try that if it's only for 1 specific app. See question How to click button in settings using AccessibilityService? which clicks a button. This will not scale if you want to do this for more apps. You could however parse the text that is on the screen and look for http links and process them in a background service and then show a floating button like Link Bubble Browser
You can simply trigger the share activity of your app when you detect the text from the other app; but the question is how will you know when user is done typing the text?!
One way is you can place a system-wide floating button similar to Facebook Messenger and after user clicks it, the text can be shared. This will reduce number of clicks user has to do.
So,
1) Yes, its possible to get text content via AccessibilityService.
2) No, you cannot automate this action.

Control default contact list and messages app

Is there a way I can control what contact list and messages show? I want to make an app that if enabled will hide certain contacts or messages from certain people. I am not sure of this is doable
Please let me know if this can be done programmatically. Please note that I am referring to the default contact/messages APP that comes with android and I want to be able to control what it shows from my app
Thank you
Please note that I am referring to the default contact/messages APP that comes with android and I want to be able to control what it shows from my app
Fortunately, this is not possible, except by modifying the actual data, as noted in a comment on your question. You cannot hack into other apps like some script kiddie.
Note that, due to synchronization, deleting contacts may wind up deleting them from an upstream data source. The user may not appreciate this.
You are welcome to build your own contact app that maintains its own filtered list of contacts.

Android App and Pattern Lock Screen

I am currently developing an app for android 2.2 or above.
I want to allow the user to enable a login before having access to the app. I want to allow the user to choose between various types of login like password, pin or pattern.
I was wondering if would be possible to add a pattern lock to my own app. Is there a plugin I can use to create one or use android's pattern lock for my own app. I only want this for the app I don't want it to change how the actual device is locked.
Thanks for any help you can provide.
I dont think there is a widget for this. I would create a matrix of images 3x3 give them each a listener and keep track of the order the user presses them. Then take the order, 2,3,6,5,8 for example, save them as a string "23658" this is the password! hash and save that somewhere. whenever a user inputs the button order compare the input hash to the saved one.
If any body is still searching for the answer, I found this library which is pretty useful and much better than the android-lockpattern, hosted on GitHub
There is source for this though:
http://code.google.com/p/android-lockpattern/source/browse/src/group/pals/android/lib/ui/lockpattern/widget/LockPatternUtils.java?r=7470bc287cba61198430e3d8aff32196bb5824a0

Categories

Resources