dotnet / android-samples Goto Github PK
View Code? Open in Web Editor NEWA collection of .NET for Android sample projects
Home Page: https://dotnet.microsoft.com/apps/mobile
License: MIT License
A collection of .NET for Android sample projects
Home Page: https://dotnet.microsoft.com/apps/mobile
License: MIT License
here is my code for Line edit text, but I have faced problem with the line color.
line colors are not same, when i drew it in edittext..
public class LineEditText : EditText
{
private Rect rect;
private Paint paint;
public LineEditText(Context context, IAttributeSet attrs) : base(context, attrs){
rect = new Rect ();
paint = new Paint ();
paint.SetStyle (Android.Graphics.Paint.Style.Stroke);
paint.Color = Color.LightGray;
}
protected override void OnDraw(Canvas canvas) {
int height = Height;
int lHeight = LineHeight;
// the number of line
int count = height / lHeight;
if (LineCount > count) {
// for long text with scrolling
count = LineCount;
}
// first line
int baseline = GetLineBounds(0, rect);
// draw the remaining lines.
for (int i = 0; i < count; i++) {
canvas.DrawLine(rect.Left, baseline + 1, rect.Right, baseline + 1, paint);
// next line
baseline += LineHeight;
}
base.OnDraw(canvas);
}
}
.
I have been trying to build the Support Lib Fragments inside the FragmentWalkthrough on a Mac. I have done the following.
Warnings:
/Users/developer/Projects/monodroid-samples/FragmentsWalkthrough/SupportLibFragments/SupportLibFragments.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_ResolveSatellitePaths target) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: warning : Reference 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' not resolved
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: warning : Reference 'Mono.Android.Support.v4, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' not resolved
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: warning : Reference 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' not resolved
Errors:
/Users/developer/Projects/monodroid-samples/FragmentsWalkthrough/SupportLibFragments/SupportLibFragments.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_GenerateJavaStubs target) ->
: error XA0009: Error while loading assembly: /Users/developer/Projects/monodroid-samples/FragmentsWalkthrough/SupportLibFragments/obj/Release/android/assets/supportlibfragmentssample.dll
3 Warning(s)
1 Error(s)
I tried the same thing on windows and I was able to build to a phone. I have also had some problem with my phones ABI, so I went into the Project Settings and I added the (armeabi-v7a).
Deploying in Debug mode works on mac with the same configuration.
Differences between release and debug build
Linker was set to
General
Much appreciated binding, and a basic menu using SlidingActivity is possible, but I have been completely unsuccessful getting the SlidingFragmentActivity to resolve. Digging into the binding a bit revealed that the SlidingFragmentActivity class does not seem to be exposed.
Hi,
I've already using Ubuntu 14.04 LTS Linux system. My question is: is there any option to use Xamarin Android libraries on this Linux operational system?
I know that Xamarin team don't want to make Xamarin IDE for Linux (prove I found here: https://forums.xamarin.com/discussion/1599/xamarin-studio-in-linux), but is it possible to use these Android libraries in Mono Develop? I've already heard about Mono for Android, but according to this page:
https://developer.xamarin.com/releases/android/mono_for_android_4/mono_for_android_4.4/
I see that Monodroid has now version 4.4, where Xamarin.Android has the newest version as 6.0. Is Mono for Android up-to-date or just an old, already deprecated project.
Could you explain me clearly how nowadays does situation with Xamarin.Android for Linux. Monodroid and Xamarin IDE for Linux looks like?
Thanks in advance,
Piotr
While running the ActionBarViewPager (HelloSwipeViewWithTabs) sample an exception is thrown when the orientation is changed.
The issue occurs base.OnCreate(bundle);
is executed when Activity1 is recreated due to the orientation change:
using System;
using System.Collections.Generic;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Support.V4.View;
using Android.Support.V4.App;
namespace HelloSwipeViewWithTabs
{
[Activity(Label = "HelloSwipeViewWithTabs", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : FragmentActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
var pager = FindViewById<ViewPager>(Resource.Id.pager);
var adaptor = new GenericFragmentPagerAdaptor(SupportFragmentManager);
adaptor.AddFragmentView((i, v, b) =>
{
var view = i.Inflate(Resource.Layout.tab, v, false);
var sampleTextView = view.FindViewById<TextView>(Resource.Id.textView1);
sampleTextView.Text = "This is content";
return view;
}
);
adaptor.AddFragmentView((i, v, b) =>
{
var view = i.Inflate(Resource.Layout.tab, v, false);
var sampleTextView = view.FindViewById<TextView>(Resource.Id.textView1);
sampleTextView.Text = "This is more content";
return view;
}
);
pager.Adapter = adaptor;
pager.SetOnPageChangeListener(new ViewPageListenerForActionBar(ActionBar));
ActionBar.AddTab(pager.GetViewPageTab(ActionBar, "Tab1"));
ActionBar.AddTab(pager.GetViewPageTab(ActionBar, "Tab2"));
}
}
}
I've based a portion of an app I'm currently developing on this sample and although my app doesn't require landscape orientation, I'd still like to understand why this is throwing and the proper way to avoid it...
Hey,
When I grab the latest build I from the git repo and try to build it in VS2012 with latest Mono for Android (windows uninstaller calls it version 4.4.55, and VS says there is no updates when I manually check).
Error I get is
Error 6 The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)
at Ionic.Zip.ZipFile._InternalExtractAll(String path, Boolean overrideExtractExistingProperty)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() Mono.ActionbarsherlockTest
Wanting to be able to build this for Android 2.2. Any help would be greatly appreciated.
In the Cheesesquare sample only items in the first group is checked in the NavigationView. I want to make items in second group checked too.
something like this:
http://howtobox.org/how-to-set-shared-checkable-behavior-across-all-groups-in-navigationview/
IMenu m = navigationView.Menu;
for (int i = 0; i <= m.Size () - 1; i++) {
IMenuItem mi = m.GetItem (i);
if (!(mi == e.MenuItem))
{
mi.SetCheckable (false);
}
}
e.MenuItem.SetCheckable (true);
e.MenuItem.SetChecked (true);
does this make sense?
Can you add this this too the sample?
I do that
public override bool OnCreateOptionsMenu(IMenu menu)
{
SupportMenuInflater.Inflate(Resource.Menu.share_action_provider, menu);
Com.Actionbarsherlock.View.IMenuItem shareMenu = menu.FindItem(Resource.Id.menu_item_share_action_provider_action_bar);
Com.Actionbarsherlock.Widget.ShareActionProvider shareAction = (Com.Actionbarsherlock.Widget.ShareActionProvider)shareMenu.ActionProvider;
shareAction.SetShareIntent(createShareIntent());
return true;
}
when I execute "SetShareIntent", I received a null object.
Anybody can help me.
Hi
It seems that JNIDemo and JniDemo were created on case sensitive fs, thus appear as separate folders and versions.
Should be merged.
https://github.com/xamarin/monodroid-samples/tree/master/JNIDemo
https://github.com/xamarin/monodroid-samples/tree/master/JniDemo
I added the facebook binding to my project and attempted to follow the facebook sdk instructions for setting up a session based login activity.
When the Com.Faccebook.UiLifecycleHelper is being initialized, I get an error that says "Argument applicationId cannot be null"
I tried adding:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id" />
to AndroidManifest.xml, and the following to Strings.xml:
<string name="app_id">12471902489108</string>
but the application id still cannot be read.
I tried 10 different capitalizations for "com.facebook.sdk.ApplicationId", but I still get the same error.
Here is the stack trace for the exception:
Java.Lang.NullPointerException: Argument applicationId cannot be null
at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00023] in /Users/builder/data/lanes/monodroid-mlion-master/294d4619/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:368
at Com.Facebook.UiLifecycleHelper.OnCreate (Android.OS.Bundle) [0x00048] in c:\buddyup\monodroid-samples\monodroid-samples\Facebook\Mono.Facebook\obj\Debug\generated\src\Com.Facebook.UiLifecycleHelper.cs:158
at BuddyUp.FBLoginActivity.OnCreate (Android.OS.Bundle) [0x00027] in c:\buddyup\mobile\buddyup_mobile\BuddyUp\FBLoginActivity.cs:71
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-master/294d4619/source/monodroid/src/Mono.Android/platforms/android-10/src/generated/Android.App.Activity.cs:1561
at at (wrapper dynamic-method) object.0f7bec40-34dd-40a5-a892-0a3ffbf275a4 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
at
at --- End of managed exception stack trace ---
at java.lang.NullPointerException: Argument applicationId cannot be null
at at com.facebook.internal.Validate.notNull(Validate.java:29)
at at com.facebook.Session.<init>(Session.java:224)
at at com.facebook.Session.<init>(Session.java:209)
at at com.facebook.UiLifecycleHelper.onCreate(UiLifecycleHelper.java:73)
at at buddyup.FBLoginActivity.n_onCreate(Native Method)
at at buddyup.FBLoginActivity.onCreate(FBLoginActivity.java:33)
at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at at android.os.Handler.dispatchMessage(Handler.java:99)
at at android.os.Looper.loop(Looper.java:130)
at at android.app.ActivityThread.main(ActivityThread.java:3683)
at at java.lang.reflect.Method.invokeNative(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:507)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at at dalvik.system.NativeStart.main(Native Method)
In BluetoothLeGatt/DeviceControlActivity.cs, should use "&" instead of "|" when operating on a GattProperty to determine if property is "GattProperty.Read", etc.
There is a sign-out button on the LeaderBoards page and if try to sign out by tapping this button the GoogleApiClient doesn't disconnect - it just goes to "signed out" state.
Here is the fix for GameHelper.cs to perform complete sigh out:
const int RESULT_RECONNECT_REQUIRED = 10001;
public void OnActivityResult (int requestCode, Result resultCode, Intent data) {
if (requestCode == RC_RESOLVE) {
if (resultCode == Result.Ok) {
Start ();
} else {
if (OnSignInFailed != null)
OnSignInFailed (this, EventArgs.Empty);
}
} else if ((int)resultCode == RESULT_RECONNECT_REQUIRED) {
SignOut (true);
}
}
public void SignOut(bool reconnectingRequired = false) {
SignedOut = true;
if (_googleApiClient.IsConnected) {
if (!reconnectingRequired) {
GamesClass.SignOut (_googleApiClient);
}
Stop ();
using (var settings = this._activity.GetSharedPreferences ("googleplayservicessettings", FileCreationMode.Private)) {
using (var e = settings.Edit ()) {
e.PutString ("playerid", String.Empty);
e.Commit ();
}
}
_googleApiClient.Dispose ();
_googleApiClient = null;
if (OnSignedOut != null)
OnSignedOut (this, EventArgs.Empty);
}
}
I blindly tried adding the ActionBarPullToRefresh.dll to my existing project that uses ActionBarSherlock, and started seeing build errors like the following:
package uk.co.senab.actionbarpulltorefresh.library.PullToRefreshAttacher does not exist uk.co.senab.actionbarpulltorefresh.library.PullToRefreshAttacher.OnRefreshListener
The ActionBarPullToRefresh sample app worked fine, so I was confused. I added a reference to ActionBarSherlock (and then Mono.Android.Support.v4), and then the sample project started having build errors:
package com.actionbarsherlock.widget.ShareActionProvider does not exist com.actionbarsherlock.widget.ShareActionProvider.OnShareTargetSelectedListener
package com.actionbarsherlock.widget.SearchView does not exist com.actionbarsherlock.widget.SearchView.OnSuggestionListener
etc...
Double-clicking the error opens up one of the generated obj/.../*.java files.
Is ActionBarPullToRefresh not compatible with ActionBarSherlock? Can it be made to be if not?
If you reference Mono.Facebook from a Mono for Android Application that doesn't have the package name com.facebook.android, then you get the following error:
Unhandled Exception:
Java.Lang.NoClassDefFoundError: com.facebook.android.R$drawable
Please help.
Thanks,
Lee.
In the layout monodroid-samples/android5.0/Cheesesquare/Resources/layout/activity_detail.xml, if I set the CardViews as clickable, then the scroll stops working, do you know how can I have scrollable views and the appbarlayout working together?
I've been testing with tabspager but does not work, I have this error:
"Unable to find the default constructor on type Support.LoaderCursor Support"
How can I change style of the ActionBar in this example?
I've tired this:
@style/Widget.Styled.ActionBar @style/Widget.Styled.ActionBar @drawable/bg_striped @drawable/bg_striped @drawable/bg_striped_split @drawable/bg_striped_split
but it not see parent from Sherlock.
Sample link: http://developer.xamarin.com/samples/monodroid/android5.0/ScreenCapture/
Screenshot showing missing library in solution: http://screencast.com/t/cZCz5mAZSYr
I try to compile this project using Xamarin.Android 4.8.3 but it doesn't work :/ :/
I downloaded, compiled and installed the CalendarDemo on my Android and when I run the program and look at the Events I have in my calendars all the Event Days are off my 1.
One of the Events is Dec 6th 2013 and it shows it as Dec 5th 2013
Another is Jan 28th 2014 and it shows it as Jan 27th 2014.
Looking at the code I have to assume that ".dtstart" is not being read right?
Is this a problem I can fix?
BobVal
4.2 is the latest and it seems to have a lot of issues that the original 3.0.8 doesn't seem to have.
The reference points to beta3 and the Nuget points to beta2.
Also you should probably add a 1G Java heap size to the Android build options; I was getting errors prior to that.
Only seems to work if Lollipop is already on the device. So, why use AppCompat?
I just get the following build errors:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 1. Output: obj/Debug/res/values/styles.xml:1: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DarkActionBar'.
obj/Debug/res/values/styles.xml:2: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
obj/Debug/res/values/styles.xml:1: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
obj/Debug/res/values/styles.xml:1: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Since your last release of Xamarin, samples using the CardView library no longer build :(. I have the latest Xamarin and Android SDK software stack. What's up?
I tried this project and not worked. Then I discovered that the problem was in the wrong UUID. I entered 00001101-0000-1000-8000-00805F9B34FB and then worked. The value I got from bluetoothDevice.getUuids () [0] .getUuid () from the device to which i want to connect. So it seems that for CreateRfcommSocketToServiceRecord should use the UUID of the device and not from the application. If so, please modify the Commentary private static UUID MY_UUID
Hey, i tried to the GridViewPager Sample and it doesn't build. It builds with Xamarin.Android.Wear Bindings 1.0.0-preview7. The problem comes with latest Xamarin.Android.Wear Bindings, because in 1.1.0.2 the ImageReference Class got removed from the dll. Is there any Solution to use it with latest Xamarin.Android.Wear Bindings ?
When compile the sample I have this error:
Error CS0234: The type or namespace name 'Void' does not exist in the namespace 'java.lang' (are you missing an assembly reference?) (CS0234) (ActionBarPullToRefreshSample)
I have problems with reference :
using Void = Java.Lang.Void;
// Construct an Intent as normal
Intent intent = new Intent (this, typeof(DetailActivity));
intent.PutExtra (DetailActivity.EXTRA_PARAM_ID, item.id);
ActivityOptions activityOptions = ActivityOptions.MakeSceneTransitionAnimation (
this,
// Now we provide a list of Pair items which contain the view we can transition from, and the name of the view it is
// transitioning to, in the launched activity
new Pair (view.FindViewById (Resource.Id.imageview_item), DetailActivity.VIEW_NAME_HEADER_IMAGE),
new Pair (view.FindViewById (Resource.Id.textview_name), DetailActivity.VIEW_NAME_HEADER_TITLE)
);
// Now we can start the Activity, providing the activity options as a bundle
StartActivity (intent, activityOptions.ToBundle ());
I have an error when you run this code inside the Fragment. Apparently as an argument I need main Activity. How can I get it?
Hey All,
From information on the internet, you need to request a API key by giving the MD5 fingerprint from your android debug store. All examples state it should look like
keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android
however from looking at the way the project gets signed, it uses a different location as shown below
-keystore "obj/Debug/debug.keystore" -storepass "android" -keypass "android"
Running that as so
keytool -list -alias androiddebugkey -keystore "obj/Debug/debug.keystore" -storepass "android" -keypass "android"
produces a different MD5 fingerprint and this ends up working with the Google Maps example, is the ~/.android/debug.keystore not the correct place to do this?
Cheers,
ChrisNTR
I pulled the sample to create a monodroid-binding for the Samsung SPen SDK, but it doesn't work with the SDK 2.3.
Attached you'll find a snippet of the error messages. Anything I don't see here? I added the libspen23.jar in "Jars" as 'inputjar'.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Bindings.targets: Error: Tool exited with code: 1. Output: java.lang.NoClassDefFoundError: android/view/View$OnHoverListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at jar2xml.JavaArchive.getPackages(JavaArchive.java:86)
at jar2xml.JavaArchive.getPackages(JavaArchive.java:64)
at jar2xml.Start.main(Start.java:118)
Caused by: java.lang.ClassNotFoundException: android.view.View$OnHoverListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 14 more
Hi,
I've tried your sample on Xamarin, and slow followed instructions how to configure gcm service on google. I got my server APIKEY and also the Regid from my device. Im using your server to send a push notification but im having problem receiving these notifications. The statuscode from the server after sending e push notification is on OK but stil not receiving pushnotifications. I spend a whole day trying to get this to work but stil no results. Can u please help me?
Per this desk case: https://xamarin.desk.com/agent/case/110003
The Sanity Tests project needs to be updated: http://developer.xamarin.com/samples/SanityTests/
A customer needs this, so if we could expedite it, that would be great!
Issue with MainActivity line 86
navigationView.NavigationItemSelected += (sender, e) => {
e.MenuItem.SetChecked (true); //.P0.SetChecked (true);
drawerLayout.CloseDrawers ();
};
Issue with "Activity not deriving from theme"
Is anyone able to send me the compiled Xamarin.Facebook.dll?
My current mono android version is 4.2.3 and I have a lot of troubles building it properly.
Don't know why the Com.Facebookbinding.Model is missing after build.
Running the VoiceRecognition sample in ApiDemo throws the following error both in an emulator and on a phone.
[monodroid-gc] GREF GC Threshold: 46800
[MonoDroid] Xamarin/Android Trial Mode Active
[Adreno200-EGLSUB] ConfigWindowMatch:2087: Format RGBA_8888.
[] s3dReadConfigFile:75: Can't open file for reading
[] s3dReadConfigFile:75: Can't open file for reading
[AbsListView] Get MotionRecognitionManager
[Adreno200-EGLSUB] ConfigWindowMatch:2087: Format RGBA_8888.
[AbsListView] Get MotionRecognitionManager
[Adreno200-EGLSUB] ConfigWindowMatch:2087: Format RGBA_8888.
[ResourceType] getEntry failing because entryIndex 129 is beyond type entryCount 4
[AbsListView] Get MotionRecognitionManager
[VoiceRecognition] Sending broadcast
[MonoDroid] UNHANDLED EXCEPTION: Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown.
[MonoDroid] at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) <0x00088>
[MonoDroid] at Android.Content.ContextWrapper.SendOrderedBroadcast (Android.Content.Intent,string,Android.Content.BroadcastReceiver,Android.OS.Handler,Android.App.Result,string,Android.OS.Bundle) <0x006ab>
[MonoDroid] at MonoDroid.ApiDemo.VoiceRecognition.RefreshVoiceSettings () <0x00087>
[MonoDroid] at MonoDroid.ApiDemo.VoiceRecognition.OnCreate (Android.OS.Bundle) <0x0022b>
[MonoDroid] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00057>
[MonoDroid] at (wrapper dynamic-method) object.4ef9ec1f-9181-40b1-8740-b5edc67b0142 (intptr,intptr,intptr) <0x00043>
[MonoDroid]
[MonoDroid] --- End of managed exception stack trace ---
[MonoDroid] java.lang.NullPointerException
[MonoDroid] at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1125)
[MonoDroid] at android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:344)
[MonoDroid] at monodroid.apidemo.VoiceRecognition.n_onCreate(Native Method)
[MonoDroid] at monodroid.apidemo.VoiceRecognition.onCreate(VoiceRecognition.java:29)
[MonoDroid] at android.app.Activity.performCreate(Activity.java:5179)
[MonoDroid] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
[MonoDroid] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
[MonoDroid] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
[MonoDroid] at android.app.ActivityThread.access$700(ActivityThread.java:143)
[MonoDroid] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
[MonoDroid] at android.os.Handler.dispatchMessage(Handler.java:99)
[MonoDroid] at android.os.Looper.loop(Looper.java:137)
[MonoDroid] at android.app.ActivityThread.main(ActivityThread.java:4950)
[MonoDroid] at java.lang.reflect.Method.invokeNative(Native Method)
[MonoDroid] at java.lang.reflect.Method.invoke(Method.java:511)
[MonoDroid] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
[MonoDroid] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
[MonoDroid] at dalvik.system.NativeStart.main(Native Method)
[mono]
[mono] Unhandled Exception:
[mono] Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown.
[mono] at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) <0x00088>
[mono] at Android.Content.ContextWrapper.SendOrderedBroadcast (Android.Content.Intent,string,Android.Content.BroadcastReceiver,Android.OS.Handler,Android.App.Result,string,Android.OS.Bundle) <0x006ab>
[mono] at MonoDroid.ApiDemo.VoiceRecognition.RefreshVoiceSettings () <0x00087>
[mono] at MonoDroid.ApiDemo.VoiceRecognition.OnCreate (Android.OS.Bundle) <0x0022b>
[mono] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00057>
[mono] at (wrapper dynamic-method) object.4ef9ec1f-9181-40b1-8740-b5edc67b0142 (intptr,intptr,intptr) <0x00043>
[mono]
[mono] --- End of managed exception stack trace ---
[mono] java.lang.NullPointerException
[mono] at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1125)
[mono] at android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:344)
[mono] at monodroid.apidemo.VoiceRe
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown.
[mono-rt] at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) <0x00088>
[mono-rt] at Android.Content.ContextWrapper.SendOrderedBroadcast (Android.Content.Intent,string,Android.Content.BroadcastReceiver,Android.OS.Handler,Android.App.Result,string,Android.OS.Bundle) <0x006ab>
[mono-rt] at MonoDroid.ApiDemo.VoiceRecognition.RefreshVoiceSettings () <0x00087>
[mono-rt] at MonoDroid.ApiDemo.VoiceRecognition.OnCreate (Android.OS.Bundle) <0x0022b>
[mono-rt] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00057>
[mono-rt] at (wrapper dynamic-method) object.4ef9ec1f-9181-40b1-8740-b5edc67b0142 (intptr,intptr,intptr) <0x00043>
[mono-rt]
[mono-rt] --- End of managed exception stack trace ---
[mono-rt] java.lang.NullPointerException
[mono-rt] at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1125)
[mono-rt] at android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:344)
[mono-rt] at monodroid.ap
Would you down minimum target to 2.2 or 2.1 (pre-Honeycomb)? I want to use this library for academic application.
Thanks a lot.
Here is what I had to add to my code as EventStart and End times need timezone support:
ContentValues cv = new ContentValues();
cv.Put(CalendarContract.Events.InterfaceConsts.EventTimezone, "UTC");
cv.Put(CalendarContract.Events.InterfaceConsts.EventEndTimezone, "UTC");
I just tried running the https://github.com/xamarin/monodroid-samples/tree/master/android5.0/AppRestrictionSchema and I changed the default value of the "can_say_hello" to true in the app_restrictions.xml file but nothing changed. In fact, when I put a breakpoint to check the value of the restrictions bundle, it was empty.
I think the xml file is not being parsed/read correctly (if at all).
I ran this sample on a Nexus 7 (5.0.2)
If I have installed the facebook application, the authentication with Facebook hangs with the error "login fail please contact the marker of this app and ask them to issue 1732910 to facebook".
If I uninstall the facebook application, the authentications works fine.
File: Support4/Support4/Resources/layout-land/fragment_layout_support.xml
This code crashes the Layout example on tablets:
<fragment class="com.example.android.supportv4.app.FragmentLayoutSupport$TitlesFragment"
android:id="@+id/titles" android:layout_weight="1"
android:layout_width="0px" android:layout_height="match_parent" />
Should be:
<fragment class="support4.FragmentLayoutSupport_TitlesFragment"
android:id="@+id/titles" android:layout_weight="1"
android:layout_width="0px" android:layout_height="match_parent" />
Hi, We are facing an issue while trying to add the Xamarin.GooglePlayservices.Location.dll in geofence sample project mentioned in the below link.
https://github.com/xamarin/monodroid-samples/tree/master/google-services/Location/Geofencing
When we build the project , showing the below error message for Location Services dll.
error: package com.google.android.gms.maps.StreetViewPanorama does not exist
com.google.android.gms.maps.StreetViewPanorama.OnStreetViewPanoramaLongClickListener
error: package com.google.android.gms.maps.StreetViewPanorama does not exist
com.google.android.gms.maps.StreetViewPanorama.OnStreetViewPanoramaClickListener
error: package com.google.android.gms.maps.StreetViewPanorama does not exist
com.google.android.gms.maps.StreetViewPanorama.OnStreetViewPanoramaChangeListener
error: package com.google.android.gms.maps.StreetViewPanorama does not exist
com.google.android.gms.maps.StreetViewPanorama.OnStreetViewPanoramaCameraChangeListener
error: package com.google.android.gms.maps.model does not exist
public void onStreetViewPanoramaLongClick (com.google.android.gms.maps.model.StreetViewPanoramaOrientation p0)
error: package com.google.android.gms.maps.model does not exist
public void onStreetViewPanoramaClick (com.google.android.gms.maps.model.StreetViewPanoramaOrientation p0)
error: package com.google.android.gms.maps.model does not exist
public void onStreetViewPanoramaChange (com.google.android.gms.maps.model.StreetViewPanoramaLocation p0)
package com.google.android.gms.maps.model does not exist
public void onStreetViewPanoramaCameraChange (com.google.android.gms.maps.model.StreetViewPanoramaCamera p0)
error: package com.google.android.gms.maps.model does not exist
public void onMarkerDragStart (com.google.android.gms.maps.model.Marker p0)
error: package com.google.android.gms.maps.model does not exist
public void onMarkerDragEnd (com.google.android.gms.maps.model.Marker p0)
error: package com.google.android.gms.maps.model does not exist
public void onMarkerDrag (com.google.android.gms.maps.model.Marker p0)
error: package com.google.android.gms.maps.model does not exist
public void onMapLongClick (com.google.android.gms.maps.model.LatLng p0)
error: package com.google.android.gms.maps.model does not exist
public void onMapClick (com.google.android.gms.maps.model.LatLng p0)
error: package com.google.android.gms.maps.model does not exist
public void onInfoWindowClick
error: package com.google.android.gms.maps.model does not exist
public void onIndoorLevelActivated
error: package com.google.android.gms.maps.model does not exist
public void onCameraChange (com.google.android.gms.maps.model.CameraPosition p0)
error: package com.google.android.gms.maps.model does not exist
public boolean onMarkerClick (com.google.android.gms.maps.model.Marker p0)
error: package com.google.android.gms.maps.model does not exist
private native void n_onStreetViewPanoramaLongClick (com.google.android.gms.maps.model.StreetViewPanoramaOrientation p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onStreetViewPanoramaClick (com.google.android.gms.maps.model.StreetViewPanoramaOrientation p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onStreetViewPanoramaChange (com.google.android.gms.maps.model.StreetViewPanoramaLocation p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onStreetViewPanoramaCameraChange (com.google.android.gms.maps.model.StreetViewPanoramaCamera p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onMarkerDragStart (com.google.android.gms.maps.model.Marker p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onMarkerDragEnd (com.google.android.gms.maps.model.Marker p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onMarkerDrag (com.google.android.gms.maps.model.Marker p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onMapLongClick (com.google.android.gms.maps.model.LatLng p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onMapClick (com.google.android.gms.maps.model.LatLng p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onInfoWindowClick (com.google.android.gms.maps.model.Marker p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onIndoorLevelActivated (com.google.android.gms.maps.model.IndoorBuilding p0);
error: package com.google.android.gms.maps.model does not exist
private native void n_onCameraChange (com.google.android.gms.maps.model.CameraPosition p0);
error: package com.google.android.gms.maps.model does not exist
private native boolean n_onMarkerClick (com.google.android.gms.maps.model.Marker p0);
error: package com.google.android.gms.maps.LocationSource does not exist
com.google.android.gms.maps.LocationSource.OnLocationChangedListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnMyLocationChangeListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnMyLocationButtonClickListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnMarkerDragListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnMarkerClickListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnMapLongClickListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnMapClickListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnInfoWindowClickListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnIndoorStateChangeListener
error: package com.google.android.gms.maps.GoogleMap does not exist
com.google.android.gms.maps.GoogleMap.OnCameraChangeListener
I add the project Mono.SlidingMenu to my solution and when I add the reference to my project I allways have this error:
C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(886,3): error MSB6006: "java" exited with code 1.
Anybody have the same problem?
Please consider renaming the 3 files in the services directory that contain "" in the file name. Windows doesn't allow '<' or '>' in file names. Other than that little speed bump the sample is great and exactly what I was looking for.
Thanks!
Bradley
hello,
i'm using sherlock in my project, and I inherit SherlockFragmentActivity, but i faced problem which was that OnOptionsItemSelected(Android.Views.IMenu)': cannot override inherited member 'Xamarin.ActionbarSherlockBinding.App.SherlockFragmentActivity.OnOptionsItemSelected(Android.Views.IMenu)' because it is sealed
i faced the same with OnCreateOptionsMenu, OnPrepareOptionsMenu
UPDATE 04/29/2013: Please check at my latest comment!
When running the MapAndLocationDemoV2 on my Samsung Galaxy S3 device, it works fine until I change the screen orientation. Then, the screen is redraw correctly but the Google Maps fragment is not responding anymore. I can click on the "Zoom In/Out" button but the map won't change. Touching the map does not do anything.
The bug is happening when screen to rotating ONCE the application is running. Starting the application in landscape initialy is working.
I've trap those to lines in the debug log while changing my screen orientation:
01-07 14:19:41.165 E/SpannableStringBuilder(20204): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
01-07 14:19:41.165 E/SpannableStringBuilder(20204): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
Is it possible to Get a sample with the drawer from the latest support libary?
It would have been nice to have an implementation of tabchange/OnTabSelected events
on the
tabLayout control
I am having a problem replacing my 4.2.0 version with the 4.4.0 component version and was hoping to update from here.
Shouldn't the update to 4.4.0 have a new jar file (ActionBarSherlock-4.4.0.zip)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.