Android :: Open Activity From An Other Application Via Implicit Intent

Aug 20, 2010

I was trying to open an Activity of an other applicatoin by using an implicit Intent. It doesn't work, I thought it is possible to start an Activity of an other Application by using implicit Intent. Or do I missunderstand it?

I added following intent-filter to the AndroidManifest of Application A:

CODE:..............

And called the Intent in Application B by using folloing code:

CODE:.............

All I get ist, the error message that Application A was stoped unexpectedly.

Android :: open Activity from an other application via implicit Intent


Activate Activity From Another One Using Implicit Intent?

Apr 18, 2012

I am trying to activate an activity from another activity using implicit intent.

Code fragment of mail activity:

Code:
public void onClick(View view) {
intent = new Intent(Intent.ACTION_SEND);
int id = view.getId();[code].....

View 2 Replies View Related

Android :: Unable To Launch An Activity Using Implicit Intent Specifying Only Action

Mar 5, 2010

I am trying to launch an activity by specifying only its action(custom) defined in its intent filter from an activity in other application. The activity to be launched is the main activity of its application thus have android.intent.action.MAIN & android.intent.category.LAUNCHER set as action and category in its intent filter. Now according to android doc on Intent and Intent Filter, i do not need to specify DEFAULT category at all in this case. But doing the same i am i am unable to launch the activity.

LogCat says, Activity could not be found...

Am i misinterpreting the text or is there something else missing...?

Code, used for calling the activity

CODE:.............

Definition of Activity being called in the manifest file

COE:....................

View 1 Replies View Related

Android :: Implicit Intent - Call To Another Activity Doesnt Work If Action Name Is Defined As User Defined Names

Sep 8, 2010

implicit intent with class name as action defined in intentfilter. is not working. Only it it is defined as "android.intent.action." it is picked up ? is it so ?

I have app A with the following in manifest.xml file

CODE:.............

In app B, i tried to call the activity in A using below code.

CODE:.............

This code works. But not above line.

View 2 Replies View Related

Android :: Implicit Intent Works

Mar 21, 2010

To understand the implicit intents by example.

View 2 Replies View Related

Android :: Calling An Intent The Implicit Way

May 21, 2009

I`m trying to develop an application, just to test the ability of android to call an activity with an intent based not in the specific class name but specifying the action, category and data information. Acording to this link

http://developer.android.com/guide/topics/intents/intents-filters.html

only three aspects are consulted when comparing an intent object to select the future activity to run. I created two android projects (and two activities), the first is the main project who sends the request and the second can be called directly or through the filter. This is the call of the activity in the main project:

CODE:..................

This is the part of the manifest that specifies (or at least I try to specify) in the secondary activity that it`s available to be selected to run with that information:

CODE:...............

I installed both separatelly and I was expecteing to see the second activity after the called but instead I got an ActivityNotFoundException. By the way if I comment the t3.addCategory (Intent.CATEGORY_HOME); line and change the t3.setAction (Intent.ACTION_EDIT); to t3.setAction(Intent.ACTION_VIEW); the browser is executed so I think the problem is in the manifest of the second activity.

View 4 Replies View Related

Android :: Implicit Intent - Same Action For Mutiple Component How It Works

Sep 7, 2010

I couldnt figure out the exact understanding of implicit intents.

When i was going through the tutorial i read about it.

Here are some important points to remember: 1 - Implicit Intents do not specify a target component 2 - Components willing to receive implicit intents have to declare their ability to handle a specific intent by declaring intent filters 3 - A component can declare any number of Intent Filters 4 - There can be more than one component that declares the same Intent Filters and hence can respond to the same implicit intent. In that case the user is presented both the component options and he can choose which one he wants to continue with 5- You can set priorities for the intent filters to ensure the order of responses.

I read this about Implicit Intents.

I couldnt get visualisation of 4th point. So wanted to try it out by writing some examples.

I tested this like below. Wrote two apps.

I had written two activities in one app, CallingActivity & anotherActivity.

CODE:...........

One more app,which has two activities like below.

CODE:..................

I ran the first app in emulator and pressed home screen, it mean it runs in the background.(Not exited ) Then i opened the second app and clicked a button in frirst activity(testmain) and tried to call setAction "com.android.localguide.GET_RESULT"

i.setAction("com.android.localguide.GET_RESULT");

But it is opening the activity "results".. It dint showed a options to choose which components( i expected first app ) activity i need to use ?

Am i right in executing in the right context to understand that point no 4 ?

View 3 Replies View Related

Android :: Call Built-in Video Recorder In Droid Through An Implicit Intent?

Aug 26, 2010

Is it possible to call the built-in Video Recorder in Android through an implicit Intent? I did some search but haven't figured out yet.

View 1 Replies View Related

Android :: Open An Intent - MapView - From Main Activity With Menu

Jan 13, 2010

I'm trying from main Activity (MainFile.java) to open a Map as a new intent through a menu. Something like this...

CODE:..............

And I already have set up thing on my manifest.xml with access to...

CODE:........

It worked fine with other File.class, but with the Map.class doesn't seem to be working.

View 1 Replies View Related

Android :: Open Another Application From - Intent

May 6, 2010

I know how to update my own programs, and I know how to open programs using the a predefined Uri (for sms or email for example)

I need to know how I can create an Intent to open MyTracks or any other application that I don't know what intents they listen to.

I got this info from DDMS, but I havn't been succesful in turning this to an Intent I can use. This is taken from when opening MyTracks manually.

View 2 Replies View Related

Android :: How To Create Intent To Open Activity / That Displays Accounts & Sync Settings Screen

Jun 9, 2010

I have seen the below log message when navigating to the Account & sync settings screen but I am confused as to how to create an Intent to navigate there.I dont seem to have access to the ManageAccountsSettings for development.I just wanted to create an Intent such as below, but I cant call out ManageAccountsSettings.

View 1 Replies View Related

Android :: Using Intent - Application To Show Another Activity

Apr 10, 2009

In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicked, but I get an error.

Here are the classes:

CODE:...........

The second class that should show when the button is clicked, but never does:

CODE:........

How do I create a button that will show the second activity?

View 3 Replies View Related

Android :: Listing An Application's Activity And Intent-filters

Jun 10, 2010

I am interested in activating another application's activity. I know from reading the Android SDK that it's probably better to do this with an implicit intent. However, this activity doesn't reside in an application I own, so I don't know the action and category and data flags on the intent-filter.

How can I examine an Android applications metadata like the activity classes and the intent-filters for those activities (if declared in the manifest)?

View 2 Replies View Related

Android :: How To Open Another Activity Within Application?

May 27, 2010

I understand how to use intents and startActivity() when opening another activity within my own app, but how do you start a different app? specifically:

- How do you determine if the user has the needed app installed on their device?
- How do you start that app?
- How do you pass parameters to that app?
- How do you find all this info out for a specific app (say Adobe reader, or google maps)?

View 2 Replies View Related

Android :: Android Intent / Resuming Application Home Activity

Jul 10, 2010

I have an application that I have running a media player and I want to resume the activity from my applications home activity. I can successfully do this by adding the following flags to the startActivity Call:
myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
I am worried that this is not an ideal way to do things since it took me a long time to find it. It made me think that no one uses it very much. Are there any pitfalls to using this method?

View 1 Replies View Related

Android :: Exclude Own Activity From Activity.startActivity - Intent

Oct 17, 2010

My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.

As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Intent).

Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity() call ?

View 1 Replies View Related

Android :: Open Proper App With Intent

Sep 13, 2010

Forgive me if this is a topic that has already been discussed, but I've searched for hours and can't seem to find the answer I'm looking for. I'm trying to cut my teeth on Android programming with a simple file manager app and currently have most all functions working, but I can't seem to open a selected file with the appropriate app.

Here is my current code:

CODE:..................

View 2 Replies View Related

Android :: Open Dialogue Activity Without Opening Main Activity Behind It

Jul 19, 2010

Im writing a program that offers a quick reply dialog upon receipt of an SMS.

However, I am getting an unexpected result. When I receieve an SMS, the appropriate dialog activity comes up displaying the correct phone number and message, however there is a second activity behind it that is the 'default' activity in my program (it is what opens when i launch my application)

I do not want this second activity to come up. The quick reply activity should come up by itself over top of whatever the user was doing before.

The 'floating' activity:

CODE:.........

The call to the activity inside an onReceive()

CODE:..............

The Manifest:

CODE:.................

View 1 Replies View Related

Android :: Open Gallery Via Intent Without Result

Oct 5, 2010

I have a kind of an ApplicationLauncher that has to start the build-in gallery. But I dont want to get any result from that gallery... I just want to start it and want my "Launcher" to close after that.

What ive tried:

CODE:................

But it doestn even work with this flag... as soon as I click on a pic in the gallery, it closes and returns to my "Launcher". Is there any way to achieve what i want to do?

View 3 Replies View Related

Android :: Open A Local App File In Another App Via An Intent

Nov 8, 2010

I don't want to store said file on the sdcard in this case. The file also cannot be storage directly in the apps local files directory. It needs to be in a subdirectory, so it cannot write the file using openFileOutput() and MODE_WORLD_READABLE.

The app may download files small files like pdfs and store them locally in a subdirectory. I would like to be able to have the user open these files if they have an app that can open them.

For example here is an intent for sending a pdf:

CODE:..............

path being something like: /data/data/packagename/files/subdir/example.pdf

That intent will open a pdf viewer, but the viewer is unable to open the file. I assume this is a permissions issue. I tried Mark Murphy's suggestion here: http://groups.google.com/group/android-developers/browse_thread/thread/4e55d869213483a9/b7270078ac1a2744?lnk=raot of using Runtime.getRuntime().exec("chmod 755 " + fileName); but it didn't make any difference. He also suggested a Content Provider but I would like to avoid it if I can because it seems like a lot just to get this file over to another app.

If the content provider is the only option, do I have to save the file to the content provider or can I just use the content provider as a pass through to get it to the other app when I need to?

View 2 Replies View Related

Android :: Intent To Open Video With Raw Resource

Nov 9, 2010

Does anyone know of an intent I can use to open a raw mp4 resource in the phone's video player?

I tried this code:
CODE:..............

This threw an ActivityNotFoundException, however this has worked for me when the URI was the sdcard and the video was located there. Does anyone know how I can use the above code with a resource file in my app?

View 1 Replies View Related

Android :: Intent To Open Users Preferred Browser

Jun 28, 2010

I've been trying to find out how to create an intent that will open the user's preferred browser without specifying the URL. I know how to open it by giving a specific URL like this:Intent intent = new Intent();intent.setAction(Intent.ACTION_VIEW); intent.setData (android.net.Uri.parse ("http://www.google.com")) ;context.startActivity (intent);I don't want to open the browser to any page in particular, just the set homepage or whatever page the user was on last. I've thought about looking up the homepage set within the app but you can't do it with the default Browser app because it is private. Does anybody know of a way to do this?

View 1 Replies View Related

Android :: Handle Existing Instance Root Activity Launching Root Activity From Intent Filter

Apr 3, 2010

I'm having difficulties handling multiple instances of my root (main) activity for my application. My app in question has an intent filter in place to launch my application when opening an email attatchment from the "Email" app. My problem is if I launch my application first through the the android applications screen and then launch my application via opening the Email attachment it creates two instances of my root activity. steps: Launch root activity A, press home Open email attachment, intent filter triggers launches root activity A Is it possible when opening the Email attachment that when the OS tries to launch my application it detects there is already an instance of it running and use that or remove/clear that instance?

View 1 Replies View Related

Android : Way To Get Activity From An Intent?

Nov 2, 2010

Is it possible to get the Activity from an Intent?

View 2 Replies View Related

Android :: Set Root Activity/intent ?

Oct 14, 2010

I'm switching between different Activities using Intents. For one Activity, I would like it to clear the history stack so when the user presses the back button, it takes them Home instead of previous activities in my application.

View 2 Replies View Related

Android : Way To Handl An Intent Without Activity UI?

Jun 9, 2009

I've searched for a few hours for a solution to this, so hopefully this isn't a repost I'm setting a shortcut on the Home screen which raises an Intent to my application - the problem is that I don't want to show my app, just run a little code and display a Toast notification. This must be possible - I just can't work out how.. Once I'm handling the shortcut Intent in onCreate() the UI has initialised and I get a little screen flicker if I then run my code and finish().

View 4 Replies View Related

Android : How To Use An Intent To Update An Activity?

Aug 24, 2009

I have a service that is downloading a file. When the download is done, I would like to update my "Downloaded files" list in my Activity, but only if the Activity is running. I do not want the Activity to start if it's not already running. I was hoping I could do this by making a new Intent with some special flag. Anyone have any idea how I can achieve this? A tiny code example maybe?

View 3 Replies View Related

Android : Way To Use Intent From Non-activity Class?

Jan 2, 2010

I have three classes one main-activity(named MainMap), one non-activity class(named MyItemizedOverlay), and one activity class(named AudioStream). I want to start AudioStream activity from non-activity class but i don't know how to.

View 1 Replies View Related

Android : How To Use Intent.getStringExtra From Within An Activity?

May 27, 2010

I am relatively new to android. I have two applications A and B. I have an activity in A, lets name it x, that would launch the application B. Now the intent sent by x contains StringExtra that I want the Starting activity in B to use. Is there a way for the activity in B to do that?

View 2 Replies View Related

Android : Way To Define Two Intent In An Activity?

Jul 6, 2010

I need to start an Activity with two different Intent, can I define two Intents In an Activity node?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved