зеркало из https://github.com/mono/mail-archives.git
167 строки
6.3 KiB
HTML
167 строки
6.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [mono-android] Automatic activity start
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Automatic%20activity%20start&In-Reply-To=1323988204280-5078857.post%40n5.nabble.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="007889.html">
|
|
<LINK REL="Next" HREF="007905.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[mono-android] Automatic activity start</H1>
|
|
<B>Martyn Wendon</B>
|
|
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Automatic%20activity%20start&In-Reply-To=1323988204280-5078857.post%40n5.nabble.com"
|
|
TITLE="[mono-android] Automatic activity start">Martyn.Wendon at TCSJOHNHUXLEY.COM
|
|
</A><BR>
|
|
<I>Fri Dec 16 05:24:32 EST 2011</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="007889.html">[mono-android] Automatic activity start
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007905.html">[mono-android] Automatic activity start
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7898">[ date ]</a>
|
|
<a href="thread.html#7898">[ thread ]</a>
|
|
<a href="subject.html#7898">[ subject ]</a>
|
|
<a href="author.html#7898">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>I don't believe it matters what Intent category is used, since the
|
|
OnReceive Method is never called.
|
|
|
|
I think I worked out what was happening though, at some point we added
|
|
the option for the application to be installed to SD Card and it appears
|
|
that applications installed on the SD Card may not receive the
|
|
ActionBootCompleted since the SD Card is not mounted until after the
|
|
ActionBootCompleted Intent is sent!
|
|
|
|
Removing the option for installation to SD Card got things working
|
|
again, although we then ran into another issue where the application is
|
|
being killed due to the OnReceive method taking > 10 seconds to return
|
|
:<i>-(
|
|
</I>
|
|
So we're working on reducing application load time at the moment....
|
|
|
|
|
|
|
|
Thanks,
|
|
|
|
Martyn
|
|
|
|
-----Original Message-----
|
|
From: <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monodroid-bounces at lists.ximian.com</A>
|
|
[mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monodroid-bounces at lists.ximian.com</A>] On Behalf Of riteshsahu
|
|
Sent: 15 December 2011 22:30
|
|
To: <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monodroid at lists.ximian.com</A>
|
|
Subject: Re: [mono-android] Automatic activity start
|
|
|
|
Have you tried using Android.Content.Intent.CategoryHome instead of
|
|
Android.Content.Intent.CategoryDefault ?
|
|
|
|
|
|
Martyn Wendon wrote
|
|
><i>
|
|
</I>><i> -----Original Message-----
|
|
</I>><i> From: <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monodroid-bounces at .ximian</A>
|
|
</I>><i> [mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monodroid-bounces at .ximian</A>] On Behalf Of Jonathan Pryor
|
|
</I>><i> Sent: 15 December 2011 17:03
|
|
</I>><i> To: Discussions related to Mono for Android
|
|
</I>><i> Subject: Re: [mono-android] Automatic activity start
|
|
</I>><i>
|
|
</I>><i> On Dec 15, 2011, at 11:54 AM, Martyn Wendon wrote:
|
|
</I>>><i> Can anybody see any problem with the following?
|
|
</I>>><i>
|
|
</I>>><i> [BroadcastReceiver]
|
|
</I>>><i> [IntentFilter(new[] { Android.Content.Intent.ActionBootCompleted
|
|
</I>><i> },
|
|
</I>>><i> Categories = new[] {
|
|
</I>><i> Android.Content.Intent.CategoryDefault }
|
|
</I>>><i> )]
|
|
</I>>><i> public class BootReceiver : BroadcastReceiver
|
|
</I>>><i> {
|
|
</I>>><i> public override void OnReceive(Context context, Intent
|
|
</I>intent)
|
|
>><i> {
|
|
</I>>><i> Log.Debug("ReceiveBoot.OnReceive", "Received Intent " +
|
|
</I>><i> intent.Action);
|
|
</I>>><i>
|
|
</I>>><i> if ((intent.Action != null) && (intent.Action ==
|
|
</I>><i> Android.Content.Intent.ActionBootCompleted))
|
|
</I>>><i> {
|
|
</I>>><i> Log.Debug("ReceiveBoot.OnReceive", "Received
|
|
</I>><i> ActionBootCompleted Intent");
|
|
</I>>><i>
|
|
</I>>><i> Android.Content.Intent start = new
|
|
</I>><i> Android.Content.Intent(context, typeof(ActivityTest));
|
|
</I>>><i> start.AddFlags(ActivityFlags.NewTask);
|
|
</I>>><i> context.ApplicationContext.StartActivity(start);
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>
|
|
|
|
--
|
|
View this message in context:
|
|
<A HREF="http://mono-for-android.1047100.n5.nabble.com/Automatic-activity-start-t">http://mono-for-android.1047100.n5.nabble.com/Automatic-activity-start-t</A>
|
|
p5078121p5078857.html
|
|
Sent from the Mono for Android mailing list archive at Nabble.com.
|
|
_______________________________________________
|
|
Monodroid mailing list
|
|
<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A>
|
|
|
|
UNSUBSCRIBE INFORMATION:
|
|
<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">http://lists.ximian.com/mailman/listinfo/monodroid</A>
|
|
|
|
______________________________________________________________________
|
|
This email has been scanned by the Symantec Email Security.cloud
|
|
service.
|
|
______________________________________________________________________
|
|
|
|
______________________________________________________________________
|
|
This email has been scanned by the Symantec Email Security.cloud service.
|
|
______________________________________________________________________
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="007889.html">[mono-android] Automatic activity start
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007905.html">[mono-android] Automatic activity start
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7898">[ date ]</a>
|
|
<a href="thread.html#7898">[ thread ]</a>
|
|
<a href="subject.html#7898">[ subject ]</a>
|
|
<a href="author.html#7898">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
|
|
mailing list</a><br>
|
|
</body></html>
|