Datawedge Intents

It seems I'm at an impasse with Datawedge.

When my DW profile is configured for Broadcast Intents(or StartService for that matter), my app gets nothing and LogCat records;

09-09 21:43:27.136: E/NotificationService(627): Ignoring notification with icon==0: Notification(pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x1 kind=[null])

When DataWedge configured for StartActivity, I do received the intent, but a new copy of my Main Activity is instantiated for each barcode scan.

Can anyone tell me what I'm missing?

Robin Chander
Austin,I guess you definitely

Austin,

I guess you definitely don't want to start your activity every time you scan a barcode. When you tried Broadcast intent does your application registers a receiver to that intent?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Austin Lucas
Thanks for your response,

Thanks for your response, Robin.

Our speech application does almost ten seconds of work during onCreate, and we have no need to start it with a barcode scan, so startActivity is really not an option. 

With the broadcast intent, I'm not registering for it any differently than I am with the startActivity intent. Their intent action and intent category are exactly the same. I'm overriding onNewIntent just like the example code suggests.

The thing is, when I search for help on the error in LogCat, I get results like this one;

broadcastreceiver - Why is Android ignoring the creation of the Notification? - Stack Overflow

A lot of people are suggesting that if you don't set the icon property of your notification, Android will ignore it before gets to any would-be receivers. If this is true, I don't see a workaround other than a fix in the DataWedge code.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Roman Woloszczuk
Austin,The attached Android

Austin,

The attached Android project shows how to use a broadcast intent to receive data from DataWedge.  This may be useful to you.

I don't understand your notification issue or how it relates to DataWedge.  In the Stack Overflow link, it seems that the poster has not added any icons when building his notification.  Here's the example from Notification.Builder | Android Developers

Notification noti = new Notification.Builder(mContext)
        
.setContentTitle("New mail from " + sender.toString())
        
.setContentText(subject)
        
.setSmallIcon(R.drawable.new_mail)
        
.setLargeIcon(aBitmap)
        
.build();


Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Austin Lucas
It seems like I'm really not

It seems like I'm really not getting my question across here, so I'm going to attempt to rephrase it.

Let's forget my Android application for a moment and focus on DW. If I set up a DW profile to use broadcast intents, and I scan a barcode, should logcat record this?

09-09 21:43:27.136: E/NotificationService(627): Ignoring notification with icon==0: Notification(pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x1 kind=[null])

It looks to me like Android is ignoring the DW notification.

It's my understanding that it shouldn't. It's my understanding that my application will never see this notification, because DW sent it with no icon property. Therefore, I don't know that doing anything to my code, or reading any documentation is going to help me. I need to know whether or not DW is behaving correctly, or if Android, as logcat suggests is ignoring DW before my app ever sees the notification. 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Roman Woloszczuk
You can see the E

You can see the E/NotificationService(627): Ignoring notification with icon==0: Notification(pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x1 kind=[null]) message in the logcat even when you do not use DW.  When you do use DW you will see that message regardless of whether you are using intents or not.  It is certainly coming from a lower level in the system than DW, is benign and can be ignored.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Roman Woloszczuk
Austin,The following links
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Austin Lucas
Thanks, Roman. The first link

Thanks, Roman. The first link is how I got this far, but it only works with startActivity notifications.

The second link returns

System Error

We're sorry but a serious error has occurred in the system.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Roman Woloszczuk
Not sure why you are getting

Not sure why you are getting them System Error. The second link works for me even from home, or on my Android phone.  Can you try it again?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Austin Lucas
That's really strange. I can

moto_error.png

That's really strange. I can get to everything else just fine.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Ritesh Gupta
Austin,are you able to access

Austin,

are you able to access the link above?

Thanks,

Ritesh

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Austin Lucas
Yes, I was able to access the

Yes, I was able to access the link. Thanks. We haven't gotten around the failure when DW sends broadcast intents, though.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Roman Woloszczuk
Austin, try the following

Austin, try the following link - DATAWEDGE API for ANDROID

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments