Is it possible to register a Flutter app as an Android Intent Filter and handle Incoming Intents?

576 views
Skip to first unread message

pieter.greyling

unread,
Feb 19, 2016, 8:21:00 AM2/19/16
to Flutter Dev
Is it possible to register a Flutter app as an Android Intent Filter and to handle Incoming Android Intents?

One can launch via an Intent: 

import 'package:flutter/widgets.dart';
import 'package:flutter/services.dart';


void main() {
  runApp
(new GestureDetector(
    onTap
: () {
      Intent intent = new Intent()
       
..action = 'android.intent.action.VIEW'
       
..url = 'http://flutter.io/';
      activity
.startActivity(intent);

   
},
    child
: new Container(
      decoration
: const BoxDecoration(
        backgroundColor
: const Color(0xFF006600)
     
),
      child
: new Center(
        child
: new Text('Tap to launch a URL!')
     
)
   
)
 
));
}

But can one do the following with the Flutter Activity Intent services when an Intent is passed to the app? 


. . .
void onCreate (Bundle savedInstanceState) {
   
...
   
// Get intent, action and MIME type
   
Intent intent = getIntent();
. . .

References:


Alexandre Ardhuin

unread,
Feb 19, 2016, 8:43:47 AM2/19/16
to Flutter Dev

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To post to this group, send email to flutt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/b785cf30-af94-4d92-97a7-339f5199f135%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pieter.greyling

unread,
Feb 19, 2016, 9:02:39 AM2/19/16
to Flutter Dev
Yep, I asked it there as well. //pieter

Adam Barth

unread,
Feb 19, 2016, 12:03:45 PM2/19/16
to pieter.greyling, Flutter Dev
We don't have that wired up, but it's something we'd like to support.  The closest bug I could find is the following:


Please feel encouraged to file a bug describing exactly what you'd like.

Adam


Harsh Bhikadia

unread,
Apr 25, 2021, 6:58:30 AM4/25/21
to Flutter Development (flutter-dev)
Sorry, I am late here, but I have recently a plugin that just does that. Please check out receive_intent, and give your feedback regarding it.

Regards.

Reply all
Reply to author
Forward
0 new messages