Solved

Xamarin Android Android.Runtime.Generated

Posted on 2013-01-12
4
706 Views
Last Modified: 2013-01-17
Intent intent = new Intent(); intent.SetAction("android.SipDemo.INCOMING_CALL"); 
PendingIntent pendingIntent = PendingIntent.GetBroadcast(this, 0, intent, Intent.FILL_IN_DATA); 
mSipManager.Open(mSipProfile, pendingIntent, null);

Open in new window



On the 3rd line, I get a syntax error of:

Android.Content.Intent does not contain a definition for FILL_IN_DATA accepting a first argument of type Android.Content.Intent could be found (Are you missing a using directive or assembly reference?)

I am not using a "Using" directive. I could be missing a assembly reference. Although I'm not sure which one. I am using all the ones provided in the guide -> http://docs.mono-android.net/index.aspx?link=M%3AAndroid.Net.Sip.SipManager.Open%28Android.Net.Sip.SipProfile%29

If anyone could give me a pointer or nudge in the right direction, it would be extremely helpful.
public static PendingIntent GetBroadcast (Android.Content.Context context, int requestCode, Android.Content.Intent intent, [Android.Runtime.GeneratedEnum] PendingIntentFlags flags)

Open in new window




Am I suppose to do something with Android.Runtime.GeneratedEnum?

Thanks in advance.
0
Comment
Question by:Iamtehbest
  • 2
  • 2
4 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
Comment Utility
Did you try the suggestion you received on the official Xamarin forum?

http://forums.xamarin.com/discussion/779/fill_in_data
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
Comment Utility
Also, if you can't get it worked out (sorry, I don't have Xamarin to play with), the value seems to be a constant of 2, so might hard-code it (yikes!) or create your own constant somewhere.

http://developer.android.com/reference/android/content/Intent.html#FILL_IN_DATA
0
 

Accepted Solution

by:
Iamtehbest earned 0 total points
Comment Utility
I tried hard coding the value of 2, but it doesn't like it.  It will however let me put in 0.  

But turns out that it was because I was using a AVD.  After plugging in my phone the code worked.  Thanks.
0
 

Author Closing Comment

by:Iamtehbest
Comment Utility
Figured it out.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now