Solved

Xamarin Android Android.Runtime.Generated

Posted on 2013-01-12
4
708 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 75

Expert Comment

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

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

Expert Comment

by:käµfm³d 👽
ID: 38770753
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
ID: 38770779
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
ID: 38786396
Figured it out.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel file not created as expected 7 48
Syntax error 9 45
Anyway to make "All" the default in the dropdown? 6 34
SQL Exceptions 3 37
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

16 Experts available now in Live!

Get 1:1 Help Now