Android :: Launching An Activity Using Linkify

Jul 22, 2010

I'm not sure if this can be done, but is it possible to launch an activity from text that has been Linkified? I'm basically providing an illustrated glossary, and when the user clicks on a highlighted term, I want the activity that handles display of the image and associated text to fire up. I also need to pass in some parameters to the activity being launched.

Android :: Launching an activity using Linkify


Android :: ListView That Uses Linkify To Create A Link To Another Activity In My App

Jul 15, 2010

I have a ListView that uses Linkify to create a link to another activity in my app. the url looks something like content://com.myapp/activitiy/view?param=blah

This works fine every time.

However, in another view, I'm trying to call some code like this:

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

But for some reason this doesn't seem to work. It doesn't trigger my activity (and in fact it blows up if i dont include the setAction() call. How am I supposed to create the Intent such that it acts the same way that Linkify does...?

Now i realize i can setup the extras and then handle it in the activity, but that just seems like duplicated effort.

View 1 Replies View Related

Android :: Disable Activity Slide-in Animation When Launching New Activity?

Feb 18, 2010

have an activity which launches another activity, via a button click. By default, on newer OS versions of android, the OS will animate the new activity sliding in from right to left.Is there a way to disable this animation? I just want the new activity to appear without any sort of animation.

View 5 Replies View Related

Android :: Launching Activity From Status Bar Creates New Activity / Even When One Already Exists

Nov 9, 2010

I have an activity that starts a long-running service which in turn adds an icon to the status bar. When the activity gets invisible, e.g. by pressing the Home button, and the pressing the icon in the status bar a new activity is created instead of showing the already created activity. If you now press the back button the new activity is destroyed and the activity created in the first place gets visible. How do I make the invisible activity brought to front when pressing the icon in the status bar instead of creating a new activity?

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 :: Launching Another Activity From Application

May 22, 2010

I am trying to launch another application from my Activity. Something weird happens when I am running this code :
Intent myIntent = new Intent( Intent.ACTION_MAIN, null );
myIntent.addCategory( Intent.CATEGORY_LAUNCHER );
myIntent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED );
ComponentName compName=new ComponentName(myArray[i][0], myArray[i] [1] );
// String[][] myArray myIntent.setComponent( compName ); startActivity( myIntent );

I have this error :
android.content.ActivityNotFoundException: Unable to find explicit activity class { com.android.settings/com.android.settings.Settings};
Have you declared this activity in your AndroidManifest.xml?
But when I replace this line
// myArray[i][0] = "com.android.settings" // myArray[i][1] = "com.android.settings.Settings" ComponentName compName=new ComponentName(myArray[i][0], myArray[i] [1] );
with ComponentName compName=new ComponentName("com.android.settings","com.android.settings.Settings");
And without any modification in my manifest, it works!

View 2 Replies View Related

Android :: Launching Activity Through Intents

Aug 9, 2010

I am implementing a simple app. I need to start an activity based on the state of the Activity. Lets take i am using a button to start the activity.
1. If the activity is not started, I need to start XYZ activity.
2. If the XYZ activity is on focus, then i need to close the activity on the button press.
3. If the XYZ activity is not in focus (like onPause) state then, I need to change the button state.Can you please help me in the flags that i need to use for starting the intent. Is it possible to get the state of activity before I start that activity?

View 2 Replies View Related

Android :: Activity Not Launching MapActivity

May 6, 2010

I have a TabActivity that loads in 3 activity classes.In those Activity classes I have a button and an OnClickListener that tries to open a MapActivity class.I have searched to find an example of an Activity class launching a MapActivity class but cannot find one. If I swap out my MapActivity class with a Activity class it works.

View 2 Replies View Related

Android :: Dialog Theme When Launching From Another Activity

Aug 24, 2009

I am facing a strange problem. I have 2 activities.The Second activity having the theme.Dialog (set in manifest). when I launched the second activity from first activity via startActivityforResult(). The Second activity is not Visible.

View 8 Replies View Related

Android :: Launching Browser In Preference Activity

Jan 11, 2010

I want to List Item in Preference activity. and I want to launch a Browser with a URL which can change dynamically, When I click on that Item. Can anyone let me know how can i Achieve?

View 4 Replies View Related

Android :: Launching An Activity From Widget Click

May 19, 2009

I am working my way through oh my first widget (so this is 1.5, obviously) and I'm stuck. I've poked around a problem involving the launch of an Activity when clicking on a widget. Scenario: User drags widget on home screen without prior launch of the Activity in question. I am following this post: http://android-developers.blogspot.com/2009/04/introducing-home-scree... Instead of launching the browser through ACTION_VIEW, I am trying to launch an Activity by class. I've toyed around with different Intent settings, but no luck.

View 7 Replies View Related

Android :: Launching An External Activity From Widget

Dec 22, 2009

I have written a widget that cycles through a series of movie poster images with next/prev buttons.This works.There is another button on the widget that needs to launch an external activity, sending it the name of the shown movie.The other activity is not in the same namespace, package or eclipse project as the widget.It is written by another developer and its apk is installed on my emulator.

View 7 Replies View Related

Android :: Launching Correct Activity On Resume

Jan 22, 2010

I'm currently working with a two-activity application. The first activity allows the user to choose options for their upload, and the second activity displays a ListView of their results once processed.I have code in place that performs the uploads/downloads in the background, regardless of whether the application is currently in focus or not (thanks to Matthias Kaeppler's Droid-Fu).I would like to have my application Resume into my second (results) activity when a user clicks on the icon from the top-level launcher, regardless of how long they have been away from the app. I thought that the 'alwaysRetainTaskState' flag in the Manifest would do it, but I've not had success with that. Can anyone tell me how I need to set up my Manifest to get this functionality?

View 19 Replies View Related

Android :: Launching Activity From Overlay OnTap

Feb 10, 2009

I am wondering if I am going about this problem the correct way.I am making an app that places overlays on top of google maps.When you click on the overlay it should launch a dialog type window that will give you options on what to do with that overlay.It is the line startActivity where the app throws an exception.I did the setFlags because an error message said it was needed because I was trying to start the Activity while outside an Activity.That makes me think I am going about this wrong.I have 'MyActivity' listed in my manifest so I don't think that is the issue.I have searched for this problem on the internet and I can't seem to find anyone else running into this so that is another reason I think I may be trying to do this the wrong way.

View 3 Replies View Related

Android :: Launching Activity At Its Current State

May 17, 2010

I am trying to make a task switcher and i succed in it. My only problem is that when I launch activities, they are relaunched as they were new activities ( for instance, I am writing an email, i press home and go into my activity,launch email, and then the app launch the email bout goes back at the inbox and the email is lost) So that's not true multitasking.

View 2 Replies View Related

Android :: Launching Intent Can't Find Activity

Jul 2, 2010

My program has a list of tabs that each contain a list of people.Clicking a person should edit their details, but instead, clicking a person throws an ActivityNotFoundException.

View 2 Replies View Related

Android :: Launching Intent From Class Outside An Activity

Jul 28, 2010

I've got two activities, one of them is called MyActivity. I want both of them to be able to use a function located in a class othat we may call MyClass. In MyClass, I try to use an intent to launch the activity AnotherActivity. Since the constructor takes a context as parameter, I simply tried to store a context from the activity in the constructor, and then use it when I try to create my intent.However, even thought none of the arguments are null (checked that with a simple if-statement), intent seems to be null and a NullPointerException is thrown. Why does it not work, and what can I do to solve the problem?
I'm quite new to Android and Java development, so please explain it as basic as you can.

View 2 Replies View Related

Android :: Application Component Not Instantiated Before Launching Activity

Dec 17, 2009

I got a null pointer exception in an Activity onCreate() while trying to access my Application object (extended from android.app.Application).This exception occurred very rarely and i have no way to reproduce this again.My App starts a service on BOOT_COMPLETED intent and the null pointer exception seems to have occurred during boot up. Can somebody please throw some light on this issue? Application should have been created before creating any activities.

View 2 Replies View Related

Android :: Prevent Duplicate Browser / Activity Launching

Jun 29, 2010

I would like to know if there is a way of preventing a duplicate launch of browser/activity, while the user is already focused on it.mybe there is a way to detect before if the user's current screen is already focused on the same activity/browser i intent to launch?

View 2 Replies View Related

Android :: Identifying Which Widget Click Is Launching Activity?

Jun 8, 2009

I m creating my own widget widget initial layout contains one button.when i click on that widget button it shud launch the specified activity using service everything is working fine..but the problem comes when there are 2 or more widget on home screen when i clicking on any one of them i m not able to specify with widget is launching the activity.

View 6 Replies View Related

Android :: Bug In Activity Stack If Launching From Home Icon?

Jul 24, 2009

I've noticed some strange behaviour with resuming a task from a Home icon.Very easy to replicate, just create a new bare bones android project using eclipse, don't need to add anything. Then follow these steps:

1. In eclipse, Run the project on a emulator or device.

2. Once the app installs and launches the first activity, press Home key.

3. Launch the app again by pressing its icon.

4. Press Back key. Now this part seems wrong, you'll go back to the original activity in the stack, instead of the Home screen, even though its been previously launched and what you expect is it to bring back the stack as it was left, with one activity. If you repeat steps 2-3, it will just keep adding the same activity to the stack.

That is until you press Back all the way through the stack to the Home screen.Now this behaviour will never again replicate. It will be the correct (?) behaviour of bringing back the stack history at the state it was when Home was pressed. Note there are no behavioural modifications, this is just a default application. However, I tried many combinations of launchModes and stack clearing, they had no effect on the first run. Unless I'm interpreting the documentation wrong, when the user presses the Home key, the task is moved in to the background and simply brought back the next time they press the app icon? Why is the app icon altering the task it creates, if it already exists (with no flag modifications)?

View 3 Replies View Related

Android :: After Killing Task Droid Not Launching Correct Activity / What Is Happening?

Aug 19, 2009

Our application is defined to launch a SplashScreenActivity from Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} . After the SplashScreenActivity does its work, it launches another intent to launch MainMenuActivity and finish() is called on SplashScreenActivity.

When we run our app for the first time on our phone, the SplashScreenActivity launches OK, and correctly launches the MainMenuActivity.

However, if we kill the app using TaskKiller, LOGCAT indicates that the application has been killed. I can't debug the app, because launching it from eclipse with the debugger makes it work OK, because it reinstalls the app. Perhaps there is a way to launch the app without reinstalling it?

Here is the Log of us killing our app...

When we launch the application again, the LOG messages for SplashScreenActivity are not logged and it looks from LOGCAT that Android is launching the MainMenuActivity instead. Here is the log...

Can someone Romaine, Diane help us understand what is happening? We saw this happening because some variables are initialized in SplashScreenActivity that aren't available with MainMenuActivity and we were getting NPEs.

View 3 Replies View Related

Android :: Pausing VideoView When Launching A New Intent / Resume It To Starts Up Activity Again?

Jul 23, 2009

I have an activity that is showing a video and when the user clicks a button, a new activity is launched. When the video activity stops, I pause the video view. When the video activity starts up again, I try to resume the video view videoView.start(), however, the video starts over from the beginning. I'm thinking that the buffer must be lost somewhere, so I now try to capture the current position via videoView.getCurrentPosition(), however, this is always returning 0.

Anybody know how to resume video playback when an activity starts up again?

View 5 Replies View Related

Android :: Insufficient Memory Error When Launching Application For Second Time After Calling Finish - In Main Activity

Apr 21, 2009

I have made a game with just one activity.. I just replace the views when I want to change screen. The game runs fine for a really long time inspite of what ever I do within the game.

But once I close the main game, by calling finish on the only activity in the application, and then when I start again, within the next 30 secs it crashes telling VM budget exceeded..

When I don't have a dispose() or a delete method in JAVA.. how the, am I supposed to remove the objects used in memory.. moreover I have android:launchMode="singleInstance" in my manifest

View 4 Replies View Related

Samsung Captivate :: Files Folder Won't Work / Get "error While Launching Activity" - Fix It?

Oct 4, 2010

For some reason My Files folder won't work. It's not showing in my app drawer. I can find it with FolderOrganizer and make a shortcut but I get "error while launching activity" error. Any ideas?

View 2 Replies View Related

Android :: Linkify TextView ?

Sep 30, 2010

I have listview and i call intent from the listview onitem selected method but when i get linkfy textview in my listrow than i am not able to call intent from the onItem selected method.

View 1 Replies View Related

Android :: Linkify For Twitter Hashtags

Jan 1, 2010

I got the @s linkifying no problem with @([A-Za-z0-9_]+) like this:

CPDE:..........

However, when i try to do the same with hashtags the hashtag part is not passed to the link. This is what I tried:

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

It is not the matter of the hashViewURL (I tried with %23 etc.), somehow the extracted hash is not appended to the url. The hash tag is properly showing as link but the link only points to raw hashViewURL from above http://search.twitter.com/search?q=#

View 2 Replies View Related

Android :: Linkify - Using In Custom Adapter?

Jun 7, 2010

I seem to be having trouble with the linkify I am using in my Custom Adapter. For some reason I recieve the following stack track when I click on one of the links:

CODE:......

Here is the code that is calling it:

CODE:.......

I understand what the error is saying but I am not sure how to fix it.

View 1 Replies View Related

Android :: Linkify With A Custom TransformFilter?

Jul 20, 2010

I am using Linkify with a custom TransformFilter. Is it possible to tell linkify to only match the first occurence of my pattern?

View 1 Replies View Related

Android :: Linkify From HTML In TextView

Aug 9, 2010

I have HTML with standard links which correspond to commands I'd like to handle.

This is <a href="CMD:nice">a command</a>.

I populate a TextView with Html.fromHtml()

How can I use the Android Linkify system to convert the links to Linkify'ed ones?

View 1 Replies View Related







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