2016-02-19 7 views
11

एक एक स्पंदन एप्लिकेशन से किसी आशय का उपयोग कर एक और गतिविधि शुरू कर सकते हैं: https://github.com/flutter/flutter/blob/master/examples/widgets/launch_url.dartक्या एंड्रॉइड इंटेंट फ़िल्टर के रूप में फ़्लटर ऐप को पंजीकृत करना और आने वाले इरादों को संभालना संभव है?

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!') 
    ) 
    ) 
)); 
} 

लेकिन एक स्पंदन गतिविधि आशय सेवाओं के साथ निम्नलिखित एक आशय एप्लिकेशन को पारित कर दिया है जब कर सकते हैं? http://developer.android.com/training/sharing/receive.html

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

उत्तर

4

मेरी जानकारी के लिए, कोई रास्ता नहीं इस समय डार्ट कोड से आने वाली उद्देश्य हैंडल करने है। विशेष रूप से इनकमिंग यूआरएल को संभालने का मामला https://github.com/flutter/flutter/issues/357 द्वारा ट्रैक किया जाता है।

यह भी जावा कोड से आने वाली उद्देश्य हैंडल और HostMessage प्रणाली https://flutter.io/platform-services/

में प्रलेखित का उपयोग कर डार्ट को भर में परिणाम पोस्ट करने के लिए संभव है
संबंधित मुद्दे