How to pass data to the website opened from android app - android

I Want to open a site from an app and pass data from that app to that website.Like if we open google page from my app,the searching word should be passed from the app which is nothing but auto-filling.Can anybody please suggest
Thanks,in advance

Use Intent to pass data from one app to an another app.
Go through this http://developer.android.com/reference/android/content/Intent.html link for more info.
In your case, i guess implicit intents would be a better choice.

Related

Guide me about updating app without using intent

I am a new learner of android. I am working on intents right now. I am reading about intents I have few questions about the intents which are bothering my mind if any one can clear the confusion I will be obliged. Questions are :
If we want to upgrade(switch between activities) an app we are using intent. without using intent are there any other possibilities to switch between activities it.
If they are there how can an app update itself.
In what scenario does a good app do it? and in what scenario does a bad app do it?
If anyone can answer these questions in detail or can guide me to a useful resource it will be highly appreciated. Thanks in advance.
Applications are not 'upgraded' through the intent system. Look into the package manager and other aosp system code for that
Intents are either explicit:
I want to open SettingsActivity.java.
or Intents are implicit:
I want to send this text as an email.
These don't have anything to do with upgrading.
Intents are either used to trigger an action or launch an Activity. They are not used for updating or upgrading any app.
For updating an app by itself you sholud have a server to get latest version of app. Every time when app lunches, it should call the server and get the version. If it has diffrence with what is defined in manifest, there is an update.
Now for do updating, you can pass the direct link to browser by intent so that the browser download it or you can download apk file by yourself using Http client from your direct link.

How to launch a car navigation to location from the app

You might find my question silly, but I can't find anything about it. I don't even know how to call it to get the tutorial I need.
I want simply my application after clicking a button to start for example Waze and pass on the address that the user can navigate to it.
If you could just direct me what should I look for it will be great.
If you want to launch the Waze app specifically, you can use the URL scheme at waze.com/about/dev to launch the app. I don't know of any Intent protocol or URL scheme that's shared by any and all navigation apps.

How to create option for your app in another app in android

whenever my app will run, it will create one option in another app to get data from another app.
Well, I am not sure this is possible or not, Please guide
one more I know how to share data in between two app by using sent action but I want to create one separate option in another app for my app when my app start running in android
Is it possible ?
Please guide , Thanks in advance
A content provider component supplies data from one application to others on request. Such requests are handled by the methods of the ContentResolver class. A content provider can use different ways to store its data and the data can be stored in a database, in files, or even over a network.
Link1
Link2
You can do this thing this way :
Intent i=new Intent();
i.setPackage(TARGET_APP's package name);
context.startActivity(i);
You can set value this way with this intent
i.putExtra("KEy",value)
http://developer.android.com/reference/android/content/Intent.html#putExtra%28java.lang.String,%20double[]%29
On the other hand, if you want to read some data from an app, it's possible if and only if that app allows you to do so. Data generated by the app is private by default.
Another way to do this by using content provider
May be this link will help you more about content provider
http://www.tutorialspoint.com/android/android_content_providers.htm

Find out which browsers are installed?

I'm looking for a way to find out which browsers are installed on the Android Smartphone and their package names.
Why do I need it?
Well basically, my App reacts on certain URLs, i.e. http://bit.ly, so when the click such an he will get an choice in which App to open it. So far everything is working as intended.
If the user sets up this app as default for this kind of links, it will always open in this one without further asking the user. So far so good too. But by doing this, he will be completely unable to open this links in his browser.
So I need a way to send this intent directly to the browser, but to do so I have to know which app the user has set to be default for http/https scheme for example (as user can change it if there is more than 1 browser installed).
Sending the intend with
intent.setComponent(new ComponentName("com.android.browser", "com.android.browser.BrowserActivity"));
should't be a problem I think. The problem is, I can't send a standard intent für URLs, because my App would catch it again if set as default by the user.
should't be a problem I think
Hardwiring in the package and class names of code that is not yours is always a problem.
So I need a way to send this intent directly to the browser, but to do so I have to know which app the user
has set to be default for http/https scheme for example (as user can change it if there is more than 1
browser installed).
Use PackageManager and queryIntentActivityOptions() to filter your activity out and get a list of other activities that the user can choose from.

Launch Android Default Email application through btn click

I posted this query here, but as usual, noone knows / no replies
http://www.anddev.org/viewtopic.php?p=41513#41513
How can I launch the android default mail application through the click of a button in my code?
I would also like to know, how this can be done to launch the contacts list also.
Any help in this regard is appreciated,
Regards,
Rony
How can I launch the android default mail application through the click of a button in my code?
Use an ACTION_SEND Intent.
(BTW, I apologize for the formatting of that blog post -- AndroidGuys keeps changing hosting providers, which screws up my posts)
I would also like to know, how this can be done to launch the contacts list also.
Use an ACTION_PICK Intent.

Categories

Resources