Android - is it possible to interact with apps? - android

I wanted to know if an app can interact with and change behavior of other apps ? Like, if someone has my app installed and opens whatsapp, I would pre-fill the input with a default text, for example.
It doesn't matter if the phone needs to be rooted. I didn't find any way to do this so just wanted your input !
Thanks !

The other app needs to be using a ContentProvider (I don't know if WhatsApp has one). See the reference doc. Other apps can interact with the ContentProvider app by using ContentResolver. This only works for apps that open up their content in this way. Otherwise, your app can't access the other app without employing other more hacky means (like taking over keyboard/input method, etc.).

Related

Is there any way to launch my application right away without 'Ok Google"?

I've searched about launching my app with voice. And what I got is using Ok Google. However, I don't want this feature but start my app right a way without calling Ok Google. Instead, Hey, XXX Then, launch my app.
Maybe I can accomplish this feature by getting a permission of using microphone and using service of my app. In this way, At least my app will launch, if the user once launched my app during the device is on. Maybe using startActivity()?
Is it possible or not? If it is yes, What do I need to do to achieve this result?
It is not possible to launch your app using your own customized name like Hey Jarvis , open XYZ app.
You can only use the following commands in your android mobiles to launch your app.
Hey Google, open Facebook
or
Ok Google, open Facebook
The prefix, Ok Google / Hey Google are proprietary to Google's Voice Assistant that comes handy in Android mobiles. So we cannot change them as our wish, may be we can expect the something like you asked in future. But not sure.
You can refer to the google thread related to this here
As mentioned in the comments, you need to design your own voice assistant to do so. Even if you are developing your own voice assistance, not sure you can run them on your mobiles.
Edited
Maybe I can accomplish this feature by getting a permission of using microphone and using service of my app. In this way, At least my app will launch, if the user once launched my app during the device is on. Maybe using startActivity()?
You can use in-app voice features when your app is in foreground. You can give a try to this Google Actions on Android apps. Though this feature is new and limited, you can gain some idea regarding this.

Android: Detect App Launch

I am developing a lock application as an academic project. I need to detect the launch of an app so that i can launch my lockscreen on top of it and restrict opening the app till the user put correct pin. I have read a few posts and this one has a few answers that look promising.
Android, Detect when other apps are launched
Is this the right way to do it? Or is there a better way around? I have also heard about the Application class. But don't know how to implement it.
EDIT: My app supports API16 to API22.

How to integrate pinterest with android app

I need to share some text and image from my android app to Pinterest, how could it be possible?
Pinterest's API is closed off, they don't document it, or give any explanation or way to register applications to be able to use it.
Basically, they don't want anyone but them making apps that interact with their site, while it's possible (you could, for instance, run a web browser in the background and have it open pages and such just as a user on the website would) it's not really 'meant' to be done, so it won't be easy :/

Shortcut to open gmail label directly from another android program

I have a problem, and I am aware is not fully supported by Android.
I am looking for a way to open specific Gmail labels directly from another Android application.
So, in the Android app I want to be able to get the email count for a Gmail label.
However, based on research, I have observed that accessing custom (user-defined) labels is not so straight forward. Any help will be much appreciated.
Summary Question: How can I directly access (open) user-defined Gmail labels from an Android application and determine the number of unread emails in that label.
Might there be something available that is similar to the Gmail Label notifier application?
Newer versions of Gmail support a ContentProvider which, I think, gives you what you want. You can read more on the Android Gmail developer site.
Note, again, that this will only work on newer versions of Gmail. You might consider using PackageManager to confirm the existence of the ContentProvider in question on any given device.

Launching Google Finance and display graph on a particular Stock, is that possible?

I would like to do two things within my Android app :
Check if the Google Finance app is installed on the device. Should be pretty straighforward, isn't it ?
If yes, launch an intent to Open up Google Finance, displaying a graph on a particular Stock. So I also need to pass the stock ticker to Google Finance in some way... but is this even possible ?
Any other alternative I could use to display Stock Charts (let's say a 5 days intraday chart) on any stock ?
Thanks for your help.
I am not aware of there being any publicly-documented packages or Intents to achieve your aim, let alone an Intent that would meet your specific open-a-graph-on-a-stock request.
Since I am assuming you are looking for something that is free, I would look into launching the Browser (or perhaps using the WebView widget) on some existing Web-based finance site.
Unfortunately, very few intents with parameters are published and documented.
OpenIntents tries to collect some of them http://www.openintents.org/
Another way of finding available intents is to look at the AndroidManifest.xml of the deployed application (usually only compressed, not encrypted). Of course, this method discovers intents that may not be public and will change over time.
Recently came across ManifestExplorer https://www.isecpartners.com/manifest_explorer.html which I have built into an .apk at http://dl.dropbox.com/u/4379928/android/ManifestExplorer.apk
It allows you to see the AndroidManifest.xml of all installed applications.
The manfiest of com.google.android.apps.finance doesn't include any relevant intents.
However, it is interesting that it contains a data scheme for http://finance.google.com so that if you use the browser to navigate to this page it asks if you want to open it in the finance app instead.
Best way would probably be to follow the advice from CommonsWare

Categories

Resources