How to launch my app if some one browses any xml file

by Dianne Hackborn » Thu, 18 Jun 2009 16:39:29 GMT


Sponsored Links
 I don't think you can do this because the initial URL interception happens
when the browser is processing the URI, before it has a MIME type.  If it
doesn't find an external activity to handle the raw URI, it will at that
point see if it can handle it internally.  At that point either it will do
so, or only if it can't handle it internally will it start retrieving it (at
which point it finds out its MIME type) and if there is an activity that
contains that MIME type it will hand it off.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~



How to launch my app if some one browses any xml file

by Sujay Krishna Suresh » Thu, 24 Sep 2009 20:34:29 GMT


 


I think wat u r speakin abt is wat a plugin can do.
I'm not sure if plugin development is even possible for android's browser.
But wat u can try is have an intent-filer in your manifest consisting of
action ACTION_VIEW and content-type application/xml.
But 'm not very sure tat it'd work.
U could chk its workin by using a file-browser(like the OI file manager)
app, trying to view a xml/rss file stored in ur phone/sdcard.



-- 
Regards,
Sujay
Jonathan Swift< http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> ;
- "May you live every day of your life."

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How to Handle Delays/Waits

I'm trying to figure out the best way to do this, and hoping someone
can help...

I've created a AnimationDrawable using XML and have no problem setting
that to an ImageView to display.

The question is, what's the proper way to hold the animation for a
specific amount of time, say so that the animation occurs a specific
amount of time?

Basically I want to show the animation for say one second, then clear
the animation and replace the ImageView with a static image (think
shuffling cards, or rolling a die?)

Thanks,
Mark
--~--~---------~--~----~------------~-------~--~----~

2. Unable to record using MediaRecorder

I've been trying this for over a day and haven't found anyone who
seems to know, so I'm hoping someone can help.

Every time I try to record, I get the following error:
java.lang.RuntimeException: start failed.

I've added the following to my manifest file:
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
My code is below:


ImageButton btnRec = (ImageButton) findViewById( R.id.btnRec );
       if( btnRec != null ){
           btnRec.setOnClickListener( new OnClickListener(){
              public void onClick( View viewParam ) {
                  try{
                           /*Create an Intent that will start your Activity
*/
                          recorder.setAudioSource
(MediaRecorder.AudioSource.MIC);
                          recorder.setOutputFormat
(MediaRecorder.OutputFormat.THREE_GPP);
                          recorder.setAudioEncoder
(MediaRecorder.AudioEncoder.AMR_NB);
                          recorder.setOutputFile("TesterPath");
                          recorder.prepare();
                          recorder.start();   // Recording is now started
                          tvStatus.setText("Recording now");
                  } catch (IllegalStateException e) {
                          tvError.setText("IllegealState Error found: " + e);
                      } catch (Exception e) {
                          tvError.setText("Generic Error found: " + e);
                      }
              }

         });
       }

       ImageButton btnStop = (ImageButton) findViewById
( R.id.btnStop);
       if( btnStop != null ){
           btnStop.setOnClickListener( new OnClickListener(){
              public void onClick( View viewParam ) {
                  try{
                          recorder.stop();
                          recorder.reset();   // You can reuse the object by
going back to setAudioSource() step
                          recorder.release(); // Now the object cannot be
reused
                          tvStatus.setText("Recording stopped");
                      } catch (IllegalStateException e) {
                          tvError.setText("IllegealState Error found: " + e);
                      } catch (Exception e) {
                          tvError.setText("Generic Error found: " + e);
                      }

              }
         });
       }


--~--~---------~--~----~------------~-------~--~----~

3. How to show the position in a MapView in SDK 1.

4. shared preferences between applications

5. Problem with Service Permission

6. Camera on SDK 1.0

7. Maximize size for Dialog themed activity?