Am I missing something really dumb.

by Al Sutton » Wed, 04 Feb 2009 21:37:23 GMT


Sponsored Links
 I have a service in an APK which starts a Thread which has the following 
in it's run method;

            Intent intent = new Intent("com.funkyandroid.TEST", dataURI);
            MyService.this.sendOrderedBroadcast(intent, null);

In a different APK I have the following in the application section manifest;

        <receiver    android:name=".Receiver" android:exported="true">
            <intent-filter>
                <action android:name="com.funkyandroid.TEST />
            </intent-filter>
        </receiver>

And in the onRecieve(Context,Intent) method has;

        Log.i("Receiver", "Hello Momma!!!!!");

But the receiver doesn't receive the broadcast when I run it in the 
emulator (or at least the log message doesn't get received).

Any hints?

Al.

-- 
======
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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



Am I missing something really dumb.

by Peli » Wed, 04 Feb 2009 21:59:40 GMT


 Your intent has a deceptively looking dataURI. Your intent filter
should therefore contain the <type ...> tag with the corresponding
MIME type of the dataURI in order to match.

Peli
www.openintents.org



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


Sponsored Links


Am I missing something really dumb.

by Al Sutton » Thu, 05 Feb 2009 00:13:18 GMT


 dataURI is a content provider URI 
(content://com.funkyandroid.provider.test/) which is created using 
Uri.parse.

I can't see a way to specify a MIME type in Uri.parse or in the 
resulting Uri object, so am I still missing something?

Al.







-- 
======
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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



Am I missing something really dumb.

by Peli » Thu, 05 Feb 2009 00:25:22 GMT


 In your provider, you should have a method getType(Uri uri) which
returns the MIME type of your Uri.

You should have defined it yourself as something like:
"vnd.android.cursor.dir/vnd.funkyandroid.provider.text"

and this is the MIME type that you have to declare in your intent
filter.

Peli





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



Am I missing something really dumb.

by Al Sutton » Thu, 05 Feb 2009 01:15:09 GMT


 nce again you've shown yourself as a genius. It's all working now.

Thanks (again),

Al.

Peli wrote:


--
======
Funky Android Limited is registered in England & Wales with the
company number 6741909. The registered head office is Kemp House,
152-160 City Road, London, EC1V 2NX, UK.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.


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



Other Threads

1. CustomView scrollBar

Hello, doing customView. Common issue: scroll bars not shown. Defined
*compute() methods. Shall I call in class constructor:

+
initializeScrollbars(context.obtainStyledAttributes(android.R.styleable.View));

?

If so, than how to define R.styleable.View in xml?
I tried this:


<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="View">
        <attr name="android:scrollX"/>
        <attr name="android:scrollY"/>
        <attr name="android:scrollbarAlwaysDrawHorizontalTrack"/>
        <attr name="android:scrollbarAlwaysDrawVerticalTrack"/>
        <attr name="android:scrollbarDefaultDelayBeforeFade"/>
        <attr name="android:scrollbarFadeDuration"/>
        <attr name="android:scrollbarSize"/>
        <attr name="android:scrollbarStyle"/>
        <attr name="android:scrollbars"/>
        <attr name="android:fadeScrollbars"/>
        <attr name="android:isScrollContainer"/>
</declare-styleable>
</resources>

But initializeScrollbars call rises exception. How to define
R.styleable.View properly?

-- 

2. How to set letter-spacing for EditText or TextView

I want to set letter-spacing(Character Spacing) myself for an
EditText.I searched on web and couln't find anything good.

-- 

3. INSTALL_FAILED_UPDATE_INCOMPATIBLE

4. Applications Backup

5. gstreamer-android : error observed while playing the audio pipeline using audioflinger "Failed to create AudioFlinger for format 3"

6. Voice recording

7. Problem opening page with javascript pop ups in webview