[mono-android] Login with Facebook on Mono for Android

2012-09-17 Thread HemSingh
Hi,
I have to built an app with mono for android. I am new to monodroid. I am
using Visual Studio for development. My app will work with Facebook. e.g.
User will loging with facebook account and then he can like and share
Restaurants. I need some guide where I can start.

Thanks
Hem Singh



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Login-with-Facebook-on-Mono-for-Android-tp5711824.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Out by one error between MD and VS

2012-09-17 Thread Paul Johnson

Hi,

Is anyone else seeing this problem (it's on bugzilla 
https://bugzilla.xamarin.com/show_bug.cgi?id=7163)


Basically, create on VS2010, commit to svn (not tried with cvs or git), 
edit using MD, recommit and open again on VS, change something, build. 
The next commit there is a conflict in the resources with all resource 
IDs being out by 1.


Anyone else seeing this or something similar? I'm using VS2010, MD 
3.0.4.6 (I think it is on the mac) and M4A 4.2.5 (release) on both.


Paul
--
"Space," it says, "is big. Really big. You just won't believe how 
vastly, hugely, mindbogglingly big it is. I mean, you may think it's a 
long way down the road to the chemist's, but that's just peanuts to 
space, listen..."

Hitch Hikers Guide to the Galaxy, a truely remarkable book!
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Out by one error between MD and VS

2012-09-17 Thread Craig Dunn
Paul,

are you referring to the file
   /Resources/Resource.designer.cs
?

This file should not be in source control (AFAIK), as resource ids are
regenerated on any build and aren't guaranteed to be the same. That's also
the _reason_ it doesn't need to be in source-control... it is generated
every compile.

If you want to do further reading, it's equivalent to the R.java file in
regular Android.

I presume that your app still works as expected ~ it's just the file diff
that has concerned you?

cd

On Mon, Sep 17, 2012 at 7:31 PM, Paul Johnson
wrote:

> Hi,
>
> Is anyone else seeing this problem (it's on bugzilla
> https://bugzilla.xamarin.com/**show_bug.cgi?id=7163
> )
>
> Basically, create on VS2010, commit to svn (not tried with cvs or git),
> edit using MD, recommit and open again on VS, change something, build. The
> next commit there is a conflict in the resources with all resource IDs
> being out by 1.
>
> Anyone else seeing this or something similar? I'm using VS2010, MD 3.0.4.6
> (I think it is on the mac) and M4A 4.2.5 (release) on both.
>
> Paul
> --
> "Space," it says, "is big. Really big. You just won't believe how vastly,
> hugely, mindbogglingly big it is. I mean, you may think it's a long way
> down the road to the chemist's, but that's just peanuts to space, listen..."
> Hitch Hikers Guide to the Galaxy, a truely remarkable book!
> __**_
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/**mailman/listinfo/monodroid
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Empy devices running

2012-09-17 Thread Miljenko Cvjetko

Hi

On 2012.09.12 22:36, Jeremy A. Kolb - ARA/NED wrote:

When this happens I have to restart the computer and BEFORE doing anything else 
run the emulator.  Otherwise the emulator won't come up ever.

In my experience

 * restart adb server
 * restart VS
 * no need to restart PC

HTH

mel



-Original Message-
From: monodroid-boun...@lists.ximian.com 
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of zed3
Sent: Wednesday, September 12, 2012 7:02 AM
To: monodroid@lists.ximian.com
Subject: [mono-android] Empy devices running

Hi,

I've installed mono for android trial and I'm trying to debug a hello world app 
but when I deploy with VS2010, I'm seeing the list of running devices empty.

If I run "adb devices" from the command line, the list is empty.

`adb kill-server`, then `adb start-server`

 From android virtual devices manager, if I select a device, and I click start I read 
"Starting emulator for AVD 'Android_4_VS'" but the window closes and nothing 
happens


Thanks



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Empy-devices-running-tp5711778.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid



--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rjes(enja/Solution Architect 
Razvojni programer/Senior developer
Voditelj projekta/Project Manager

IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 777
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvje...@holisticware.net
w: http://www.holisticware.net

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Silent App crash

2012-09-17 Thread Miljenko Cvjetko

Hi
On 2012.09.13 18:28, Igor Russkih wrote:

Hrr, no ideas/suggestions?

Trying to Catch unhandled exceptions?

In launcher Activity:
System.AppDomain.CurrentDomain.UnhandledException += ...

and
Android.Runtime.AndroidEnvironment.UnhandledExceptionRaiser +=
new
EventHandler(AndroidEnvironment_UnhandledExceptionRaiser);

some details:
http://mono-for-android.1047100.n5.nabble.com/Catch-all-the-exceptions-td5165993.html


Signal 11 is a segmentation fault - various reasons corrupted memory or 
similar.

Cause could be Your code or some code that You are using.
I heard that stacktrace might not reach logcat if this is static 
executable or program redirects

SIGSEGV

cheers

mel





  Igor


On Sun, Sep 9, 2012 at 11:16 PM, Igor Russkih > wrote:


Hello.

Our user reported a silent permanent app crash on LG gt 540
(android 2.1)

logcat shows no exceptions at all. Immediately after activity
showup, at some moment (current undestanding - as soon as user
taps on the main acitvity screen elements) the process just dies
silently:

I/APPLICATION ( 2776): HostView Dispose 09-07 15:33:26.728
D/WindowManager( 1278): interceptKeyTq 
event=android.view.RawInputEvent@2f8cf368 keycode=0 screenIsOn=true 
keyguardActive=false 09-07 15:33:27.898
D/WindowManager( 1278): interceptKeyTq 
event=android.view.RawInputEvent@2f8cf368 keycode=0 screenIsOn=true 
keyguardActive=false 09-07 15:33:29.548
D/WindowManager( 1278): interceptKeyTq 
event=android.view.RawInputEvent@2f8cf368 keycode=0 screenIsOn=true 
keyguardActive=false 09-07 15:33:29.638
D/WindowManager( 1278): interceptKeyTq 
event=android.view.RawInputEvent@2f8cf368 keycode=0 screenIsOn=true 
keyguardActive=false 09-07 15:33:30.113
D/WindowManager( 1278): interceptKeyTq 
event=android.view.RawInputEvent@2f8cf368 keycode=0 screenIsOn=true 
keyguardActive=false 09-07 15:33:30.238
D/WindowManager( 1278): interceptKeyTq 
event=android.view.RawInputEvent@2f8cf368 keycode=0 screenIsOn=true 
keyguardActive=false 09-07 15:33:31.108
*I/ActivityManager( 1278): Process APPLICATION.android (pid 2776) has died. 
09-07 15:33:31.108
*W/ActivityManager( 1278): Scheduling restart of crashed service 
APPLICATION.android/APPLICATION.APPLICATIONService in 2ms 09-07 15:33:31.118
W/GpsLocationProvider( 1278): Unneeded remove listener for uid 1000 09-07 
15:33:31.118
D/GpsLocationProvider( 1278): GPS status listener died 09-07 15:33:31.158
*D/Zygote ( 1136): Process 2776 terminated by signal (11) 09-07 
15:33:31.632*

There probably could be issue in the app (but on many other
platforms and android versions it works fine).

Just courious - are there any conditions where mono can silently
die? Because all time in my environment I see at least "unhandled
exception" stacktrace. But here is nothing!

Is there any mono extra debug/logging which could be enabled to
understand the problem?

  Igor




___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid



--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rjes(enja/Solution Architect 
Razvojni programer/Senior developer
Voditelj projekta/Project Manager

IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 777
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvje...@holisticware.net
w: http://www.holisticware.net

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Wrong StatsFs JellyBean?

2012-09-17 Thread Miljenko Cvjetko

Hi

Samsung!
Read Jon's explanation here:
http://mono-for-android.1047100.n5.nabble.com/detect-SD-Card-path-td5710218.html

there are few workarounds. See if those help

cheers

mel
On 2012.09.16 21:30, Francesco Colombo wrote:

Another Update:

Scenario: Samsung GS2 without SD card
External storage path: /mnt/sdcard

System tells me I've got 6.34gb of free space. API tells me that I 
have 175922186204271mb of free space (they should be 6492.16mb)



On Sun, Sep 16, 2012 at 9:25 PM, Francesco Colombo 
mailto:francesco.colo...@gmail.com>> wrote:


Another update:

Android SDK say:
Every Android-compatible device supports a shared "external
storage" that you can use to save files. This can be a removable
storage media (such as an SD card) or an internal (non-removable)
storage.

So basically calling *Environment.ExternalStorageDirectory* should
return a valid path for either for *removable* or *internal*
storage right?
I'am quite sure about this because my Samsung G2 doesn't have a SD
card and I'm getting reasonable values. :(

So my first question: "Is StatFS working on JellyBean?" remains
valid!





On Sun, Sep 16, 2012 at 9:16 PM, Francesco Colombo
mailto:francesco.colo...@gmail.com>>
wrote:

Ok, I think I've discovered what's the problem is. My
bad knowledge of android :(

Tests have been done on a device which has not a real SD card.
I'm a bit confused on how android defines spaces where apps
can write into it (local and external).

I need to investigate more. Any help is appreciate on
explaining which options are available for an android app on
"where I can write files"


On Sun, Sep 16, 2012 at 8:54 PM, Francesco Colombo
mailto:francesco.colo...@gmail.com>> wrote:

Further investigations denotes that
using*Enviornment.ExternalStorageDirectory.Path *on
jellybean return as folder */storage *in place of
*/mnt/sdcard. *Is it right?


On Sat, Sep 15, 2012 at 6:23 PM, Francesco Colombo
mailto:francesco.colo...@gmail.com>> wrote:

Hi,

I'm developing an app which on the first run it will
download a big file from FTP. Before the download
begin, the user is asked where to save the file. One
can use either local or external storage.
When the user select "external storage" the app will
use as root the
*Application.Context.ExternalCacheDir.Path* variable.
That is! In this way all content written into this
folder *will be deleted* once the app is removed from
the device.

Here my code to get available storage size:

*string *external_path =
Path.Combine(*Application.Context.ExternalCacheDir.Path*,
"/mypath");
*
*
*ulong *totalFreeSpace = 0;
*StatFs *stats = *new* Stats(external_path);
totalFreeSpace = (*ulong*)stats.AvailableBlocks *
stats.BlocksSize;

All this stuff is good on Android +2.2. I'm facing a
strange behavior ONLY on JellyBean. It seems that
StatFs will return the same available blocks value for
either internal (use*Application.Context.FilesDir.Path
*in place of
*Application.Context.ExternalCacheDir* )or external path.

Anyone can confirm this? Am I missing something?

thanks
Francesco







___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid



--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rjes(enja/Solution Architect 
Razvojni programer/Senior developer
Voditelj projekta/Project Manager

IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 777
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvje...@holisticware.net
w: http://www.holisticware.net

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Logging recommendations

2012-09-17 Thread Stephan Steiner
Hi

I'm currently in the process of porting an application originally written
for PC clients to Android. Knowing what the application does, in order to
have any chance to reproduce and explain issues that might occur on the
mobile client, I need to keep detailed logging on the android device.
Currently I'm using a singleton instance class which then dumps log messages
to Android.Util.Log. 
In the end, I need to be able to recover all the logs written by my
application and have some kind of mechanisms (should be as easy as pushing a
button in the client), that picks existing logs, puts them into an email
that can be sent to our support department.

So - what's the recommended approach for doing something like that? Is there
a way (and if so, how to do so) pick all log entries from my application
from whichever place Android.Util.Log writes to? Or should I keep my own
logs? If the latter - what do you guys use? Log4Net with the m4a patch?
Write to an sqllite database (I'm not currently using a DB - this might
eventually change, but not in the immediate future).

Regards
Stephan



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Logging-recommendations-tp5711831.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Resource Aliases

2012-09-17 Thread Andrew Gaspar
Hey guys!

I'm new to the mailing list, so I look forward to meeting you all!

I'm having an issue with Resource Aliases. In the default MasterDetailFlow
application in Java, a file is created in the "resources/values-sw600dp"
folder called "refs.xml". Refs.xml contains the following:


@layout/activity_athlete_twopane


"Athlete" is a generic name based on a specified input in the project
creation UI. activity_athlete_list and activity_athlete_twopane are both
layout files in Layout. twopane is intended for larger tablets and uses
fragments. They're both associated with the Activity AthleteListActivity.

Basically what happens is that the R.layout.activity_athlete_list is set to
point to R.layout.activity_athlete_twopane for screen sizes above sw600dp.

I'm trying to replicate this in MonoDroid to no avail. Here is the contents
of the refs.xml file in my MonoDevelop project:


@layout/ActivityAthleteTwopane


The layout resource files are appropriately renamed from
activity_athlete_list.xml to ActivityAthleteList.axml and from
activity_athlete_twopane.xml to ActivityAthleteTwopane.axml.

Unfortunately, I keep getting an error: Error: No resource found that
matches the given name (at 'ActivityAthleteList' with value
'@layout/ActivityAthleteTwopane').

Does anybody know how to resolve this issue, or if this is even possible in
MonoDevelop?

Additionally, I would just copy "ActivityAthleteTwopane.axml" to
Layout-Sw600Dp and rename it to "ActivityAthleteList.axml", but there is a
bug in both MonoDevelop and Visual Studio (2010 and 2012) where if I try to
open Resource/Layout-Sw600dp/ActivityAthleteList.axml, it displays the
contents of Resource/Layout/ActivityAthleteList.axml. If there is a
solution to fix this bug, I would love to hear it. Otherwise, take not
Xamarin.

Hope I can get some help!

Thanks,
Andrew Gaspar
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Can't Connect to Galaxy Nexus

2012-09-17 Thread Tom Opgenorth
Which version of M4A are you using? What version of Android is on your
Galaxy Nexus?



On Sun, Sep 16, 2012 at 10:59 PM, DFX  wrote:

> I'm experiencing something rather interesting. I've recently purchased an
> unlocked Galaxy Nexus, but I'm unable to get it to connect successful for
> me
> to deploy an app to it.
>
> When I launch Visual Studio I get an error "Device Failure: Unable to
> retrieve properties for device {DeviceId}. This device will not be
> available. See exception for more details." (The error lists the device's
> actual ID, not {DeviceId}).
>
> When I click "More Details", I get this:
> http://mono-for-android.1047100.n5.nabble.com/file/n5711823/Untitled2.png
>
> I've installed the drivers from Samsung and Windows recognizes the device,
> without any errors listed in Device Manager. I've tried it with two
> different Galaxy Nexus phones, both have the same behavior. I've been able
> to deploy to four other phones, an HTC Evo 4g, an HTC Droid Incredible, and
> two separate Nexus S phones, one running 2.2 and one running 4.1.
>
> I'm stumped. Any ideas?
>
>
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/Can-t-Connect-to-Galaxy-Nexus-tp5711823.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>



-- 
http://www.opgenorth.net
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Wrong StatsFs JellyBean?

2012-09-17 Thread Francesco Colombo
I've found a workaround based on solutions on this thread
http://mono-for-android.1047100.n5.nabble.com/detect-SD-Card-path-td5710218.html


My idea is to use a linux command like in the thread linked above to
retrive the available free space. To do this I'm currently using DF. In
case of failure it use StatFs.

my 2cents:

try
{
Java.Lang.Process proc =
Java.Lang.Runtime.GetRuntime().Exec(String.Format("df {0}",
uri.AbsolutePath));
 proc.WaitFor();
 var resi = proc.InputStream;
var rdr = new StreamReader(resi);
string str = rdr.ReadToEnd();
 string[] lines = str.Split('\n');
if(lines.Length < 2)
throw new InvalidOperationException("Unable to get size from shell.");
 string[] entries = lines[1]
.Split(' ')
.Where(e => !String.IsNullOrWhiteSpace(e))
.ToArray();
 string entry = entries[3];
 ulong value = (ulong)Int32.Parse(entry.Substring(0, entry.Length - 1));
string unit = entry.Substring(entry.Length - 1, 1);
 switch(unit)
{
// Value is in bytes
case "B":
return value;
 // Value is in Kbytes
case "K":
return value * 1024;
 // Value is in Mbytes
case "M":
return value * 1024 * 1024;
 // Value is in Gbytes
case "G":
return value * 1024 * 1024 * 1024;
 default:
throw new InvalidOperationException("Unknown size unit.");
}
 }
catch (Exception ex)
{
StatFs stats = new StatFs(uri.AbsolutePath);
return (ulong)(stats.AvailableBlocks * stats.BlockSize);
}

On Mon, Sep 17, 2012 at 12:57 PM, Miljenko Cvjetko <
mcvje...@holisticware.net> wrote:

>  Hi
>
> Samsung!
> Read Jon's explanation here:
>
> http://mono-for-android.1047100.n5.nabble.com/detect-SD-Card-path-td5710218.html
>
> there are few workarounds. See if those help
>
> cheers
>
> mel
>
> On 2012.09.16 21:30, Francesco Colombo wrote:
>
> Another Update:
>
> Scenario: Samsung GS2 without SD card
> External storage path: /mnt/sdcard
>
> System tells me I've got 6.34gb of free space. API tells me that I have
> 175922186204271mb of free space (they should be  6492.16mb)
>
>
> On Sun, Sep 16, 2012 at 9:25 PM, Francesco Colombo <
> francesco.colo...@gmail.com> wrote:
>
>> Another update:
>>
>> Android SDK say:
>> Every Android-compatible device supports a shared "external storage" that
>> you can use to save files. This can be a removable storage media (such as
>> an SD card) or an internal (non-removable) storage.
>>
>> So basically calling *Environment.ExternalStorageDirectory* should
>> return a valid path for either for *removable* or *internal* storage
>> right?
>> I'am quite sure about this because my Samsung G2 doesn't have a SD card
>> and I'm getting reasonable values. :(
>>
>> So my first question: "Is StatFS working on JellyBean?" remains valid!
>>
>>
>>
>>
>>
>> On Sun, Sep 16, 2012 at 9:16 PM, Francesco Colombo <
>> francesco.colo...@gmail.com> wrote:
>>
>>> Ok, I think I've discovered what's the problem is. My bad knowledge of
>>> android :(
>>>
>>> Tests have been done on a device which has not a real SD card. I'm a bit
>>> confused on how android defines spaces where apps can write into it (local
>>> and external).
>>>
>>> I need to investigate more. Any help is appreciate on explaining which
>>> options are available for an android app on "where I can write files"
>>>
>>>
>>>  On Sun, Sep 16, 2012 at 8:54 PM, Francesco Colombo <
>>> francesco.colo...@gmail.com> wrote:
>>>
 Further investigations denotes that 
 using*Enviornment.ExternalStorageDirectory.Path
 *on jellybean return as folder */storage *in place of */mnt/sdcard. *Is
 it right?


 On Sat, Sep 15, 2012 at 6:23 PM, Francesco Colombo <
 francesco.colo...@gmail.com> wrote:

> Hi,
>
> I'm developing an app which on the first run it will download a big
> file from FTP. Before the download begin, the user is asked where to save
> the file. One can use either local or external storage.
> When the user select "external storage" the app will use as root the *
> Application.Context.ExternalCacheDir.Path* variable. That is! In this
> way all content written into this folder *will be deleted* once the
> app is removed from the device.
>
> Here my code to get available storage size:
>
> *string *external_path = Path.Combine(*
> Application.Context.ExternalCacheDir.Path*, "/mypath");
> *
> *
> *ulong *totalFreeSpace = 0;
> *StatFs *stats = *new* Stats(external_path);
> totalFreeSpace = (*ulong*)stats.AvailableBlocks * stats.BlocksSize;
>
> All this stuff is good on Android +2.2. I'm facing a
> strange behavior ONLY on JellyBean. It seems that StatFs will return the
> same available blocks value for either internal 
> (use*Application.Context.FilesDir.Path
> *in place of *Application.Context.ExternalCacheDir* )or external path.
>
> Anyone can confirm this? Am I missing something?
>
> thanks
> Francesco
>


>>>
>>
>
>
> ___
> Monodroid mailing listmonodr...@lists.ximian.

Re: [mono-android] detect SD Card path?

2012-09-17 Thread johnHolmes
I had a similar issue, finding *available space* on external storage.

See here for details:

http://mono-for-android.1047100.n5.nabble.com/Wrong-StatsFs-JellyBean-tp5711813.html;cid=1347100160930-247



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/detect-SD-Card-path-tp5710218p5711835.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] If anyone needs to get osmdroid JAR bindings working here's how

2012-09-17 Thread Jeremy A. Kolb - ARA/NED
Hi Jon.

I believe Tom Opgenorth is cleaning up the XML them up and rewriting the 
tutorial based on the example I posted.

Jeremy

-Original Message-
From: monodroid-boun...@lists.ximian.com 
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Jonathan Pryor
Sent: Friday, September 14, 2012 4:33 PM
To: Discussions related to Mono for Android
Subject: Re: [mono-android] If anyone needs to get osmdroid JAR bindings 
working here's how

Would you mind forking the monodroid-samples repository, adding your sample, 
and submitting a pull request? :-)

http://github.com/xamarin/monodroid-samples

Thanks,
 - Jon

On Sep 6, 2012, at 10:04 AM, Jeremy A. Kolb - ARA/NED  wrote:

> I'm posting this here because I don't know where else to post it.  It may 
> prove useful to someone.  I had a hard time figuring out what to place in 
> Metadata.xml because the documentation isn't the greatest.  There may be a 
> better way to do this.  There are also a bunch of cleanups that could be 
> performed (ie changing getX() to a property get but I couldn't figure out how 
> to do that).
>  
> 1.   Setup your project as specified in 
> http://docs.xamarin.com/android/tutorials/Binding_a_Java_Library_%28.jar%29 
> (I called it OsmDroid)
> 2.   Add the following Jars:
> a.   osmdroid-android-3.0.8 as the input jar
> b.  httpmime-4.2.1 as reference jar
> c.   osmdroid-third-party-3.0.8 as reference jar
> d.  slf4j-android-1.5.8 as reference jar
> 3.   In EnumMethods.xml you will want the following:
>  
>   
>  clr-enum-type="Android.Graphics.Color" />
>   
>  
>   
>  clr-enum-type="Android.Locations.Availability" />
>   
>  
> 4.   Metadata.xml:
>  
>path="/api/package[@name='org.osmdroid.tileprovider.modules']/class[@name='MapTileModuleProviderBase.TileLoader']"
>  name="visibility">
> public
>   
>path="/api/package[@name='org.osmdroid.tileprovider.modules']/class[@name='MapTileModuleProviderBase.TileLoader']/method[@name='loadTile']"
>  name="visibility">
> public
>   
>  
>path="/api/package[@name='org.osmdroid.tileprovider']/class[@name='MapTileProviderBase.ScaleTileLooper']/method[@name='handleTile']"
>  name="visibility">
> public
>   
>path="/api/package[@name='org.osmdroid.tileprovider']/class[@name='MapTileProviderBase.ZoomInTileLooper']/method[@name='handleTile']"
>  name="visibility">
> public
>   
>path="/api/package[@name='org.osmdroid.tileprovider']/class[@name='MapTileProviderBase.ZoomOutTileLooper']/method[@name='handleTile']"
>  name="visibility">
> public
>   
>  
>  
>   
>path="/api/package[@name='org.osmdroid.views.overlay']/class[@name='Overlay']/method[@name='draw']"
>  name="visibility">
> public
>   
>path="/api/package[@name='org.osmdroid.views.overlay']/class[@name='TilesOverlay']/method[@name='draw']"
>  name="visibility">
> public
>   
>path="/api/package[@name='org.osmdroid.views.overlay']/class[@name='PathOverlay']/method[@name='draw']"
>  name="visibility">
> public
>   
>  
>path="/api/package[@name='org.osmdroid.tileprovider.tilesource']/class[@name='CloudmadeTileSource']"
>  />
>  
>   
>path="/api/package[@name='org.osmdroid.views']/class[@name='MapView']/method[@name='getController']"
>  name="managedReturn">
> Org.Osmdroid.Api.IMapController
>   
>  
>   
>path="/api/package[@name='org.osmdroid.views']/class[@name='MapView.Projection']"
>  name="managedName">
> MapView.ProjectionImpl
>   
>  
>   
>path="/api/package[@name='org.osmdroid.views']/class[@name='MapView']/method[@name='getProjection']"
>  name="managedReturn">
> Org.Osmdroid.Api.IProjection
>   
>  
>  
> This should get you building and you can reference the OsmDroid project in 
> your application (you don't need to use a MapActivity, a regular one works 
> just fine) and it will work.
>  
> Jeremy
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
> 
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Trojan on Setup?

2012-09-17 Thread rick.duarte
I'm trying to install MonoDroid on my Windows PC, but Kaspersky is detecting
a Trojan on it and doesn't allow to continue with the installation.
Here is the log from KIS2013:
xamarinsetup.exeDetected: PDM:Trojan.Win32.Scar.a   17/09/2012 
16:41:58
c:\users\henrique\appdata\local\temp\{e9ab888e-6304-4ba3-b36a-b1a350d36592}\.be\

Can somebody tell me if I can disable the antivírus and continue with the
installation?

Best regards,

Henrique




--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Trojan-on-Setup-tp5711838.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Resource Aliases

2012-09-17 Thread Jonathan Pryor
When will we plug all the leaky abstractions...

On Sep 17, 2012, at 11:14 AM, Andrew Gaspar  
wrote:
> I'm having an issue with Resource Aliases.

Is there any documentation on these Resource Aliases? The closest I found was 
for ID resources:


http://developer.android.com/guide/topics/resources/more-resources.html#Id

However, the documentation doesn't state that  can have a body. However, 
the documentation for Integer Array and Typed Array both state that  can 
have a body which is a resource reference:


http://developer.android.com/guide/topics/resources/more-resources.html#IntegerArray

http://developer.android.com/guide/topics/resources/more-resources.html#TypedArray

> I'm trying to replicate this in MonoDroid to no avail. Here is the contents 
> of the refs.xml file in my MonoDevelop project:
> 
> 
>name="ActivityAthleteList">@layout/ActivityAthleteTwopane
> 
> 
> The layout resource files are appropriately renamed from 
> activity_athlete_list.xml to ActivityAthleteList.axml and from 
> activity_athlete_twopane.xml to ActivityAthleteTwopane.axml.
> 
> Unfortunately, I keep getting an error: Error: No resource found that matches 
> the given name (at 'ActivityAthleteList' with value 
> '@layout/ActivityAthleteTwopane').
> 
> Does anybody know how to resolve this issue, or if this is even possible in 
> MonoDevelop?

This is a bug.

Android doesn't like PascalCased resource names for filename-backed resources, 
and @layout/ActivityAthleteTwopane is (presumably) file backed as 
Resources\layout\ActivityAthleteTwopane.axml.

Mono for Android adds support for PascalCased resource names by lowercasing all 
the resource names + references as part of the build process (see the files in 
e.g. obj\Debug\res). Unfortunately I didn't know about the  element, or 
that the  element could contain a resource reference. Result:  
isn't fixed, and contains @layout/ActivityAthleteTwopane instead of 
@layout/activityathletetwopane.

The workaround? Use the "internal" name, @layout/activityathletetwopane.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Mono for Android 4.2.6 Beta Release Available

2012-09-17 Thread Jonathan Pryor
We are pleased to announce a Beta release of Mono or Android 4.2.6. This fixes 
some serious regressions in SSL and the Visual Studio debugger that made it 
through 4.2.5.

Release notes:


http://docs.xamarin.com/android/Releases/Mono_For_Android_4/Mono_for_Android_4.2.6

Thanks!
- Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Trojan on Setup?

2012-09-17 Thread Jonathan Pryor
Please contact supp...@xamarin.com.

Thanks,
 - Jon

On Sep 17, 2012, at 4:05 PM, rick.duarte  wrote:

> I'm trying to install MonoDroid on my Windows PC, but Kaspersky is detecting
> a Trojan on it and doesn't allow to continue with the installation.
> Here is the log from KIS2013:
> xamarinsetup.exe  Detected: PDM:Trojan.Win32.Scar.a   17/09/2012 
> 16:41:58
> c:\users\henrique\appdata\local\temp\{e9ab888e-6304-4ba3-b36a-b1a350d36592}\.be\
> 
> Can somebody tell me if I can disable the antivírus and continue with the
> installation?
> 
> Best regards,
> 
> Henrique  
> 
> 
> 
> 
> --
> View this message in context: 
> http://mono-for-android.1047100.n5.nabble.com/Trojan-on-Setup-tp5711838.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
> 
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Logging recommendations

2012-09-17 Thread Jonathan Pryor
On Sep 17, 2012, at 9:07 AM, Stephan Steiner  wrote:
> Is there a way (and if so, how to do so) pick all log entries from my 
> application from whichever place Android.Util.Log writes to?

You can read logcat messages by invoking the `logcat` command (with 
System.Diagnostics.Process) and reading stdout. You will need to filter it by 
yourself (you get everything by default), and you'll also need the 
android.permission.READ_LOGS permission in order to invoke logcat:

http://stackoverflow.com/a/8092481/83444

http://stackoverflow.com/questions/4552076/how-i-start-a-process-to-run-logcat-on-android

For that reason, you may prefer a logging solution that doesn't rely on logcat, 
though logcat does provided the added benefit that if your app crashes, on 
restart you'll be able to capture the stack trace...

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Login with Facebook on Mono for Android

2012-09-17 Thread Jonathan Pryor
On Sep 17, 2012, at 3:37 AM, HemSingh  wrote:
> My app will work with Facebook. e.g. User will loging with facebook account 
> and then he can like and share Restaurants. I need some guide where I can 
> start.

This might help:

https://github.com/xamarin/monodroid-samples/tree/master/Facebook

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Mono for Android 4.2.6 Beta Release Available

2012-09-17 Thread Goncalo Oliveira
this is great news.
What about the designer break? Any estimates?

Cheers

Goncalo Oliveira
Sent from my Windows Phone
From: Jonathan Pryor
Sent: 17-09-2012 21:30
To: Discussions related to Mono for Android
Subject: [mono-android] Mono for Android 4.2.6 Beta Release Available
We are pleased to announce a Beta release of Mono or Android 4.2.6.
This fixes some serious regressions in SSL and the Visual Studio
debugger that made it through 4.2.5.

Release notes:


http://docs.xamarin.com/android/Releases/Mono_For_Android_4/Mono_for_Android_4.2.6

Thanks!
- Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Can't Connect to Galaxy Nexus

2012-09-17 Thread DFX
I'm using the 4.2.6 Beta that was just released today. The phone is running
Android 4.1.1.



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Can-t-Connect-to-Galaxy-Nexus-tp5711823p5711845.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Unable to deploy to a device with MD and Mountain Lion 10.8.1

2012-09-17 Thread Paul Johnson

Hi,

I seem to have hit a snag. Using MD 3.0.4.7 (or 4.6) and 4.2.5 or 
4.2.6beta, I am unable to deploy to a physical device using the full 
version of m4a. I can deploy to the emulator and create a package from 
my source code.


Does anyone have an idea on how to get things working with deploying to 
a real device?


Thanks

Paul
--
"Space," it says, "is big. Really big. You just won't believe how 
vastly, hugely, mindbogglingly big it is. I mean, you may think it's a 
long way down the road to the chemist's, but that's just peanuts to 
space, listen..."

Hitch Hikers Guide to the Galaxy, a truely remarkable book!
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Unable to deploy to a device with MD and Mountain Lion 10.8.1

2012-09-17 Thread nodoid
Hi,

Looks like Samsung have yet to update their drivers for 10.8...

Oh well.

Paul



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Unable-to-deploy-to-a-device-with-MD-and-Mountain-Lion-10-8-1-tp5711846p5711847.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Android Account Provider

2012-09-17 Thread javitxin
Hi,

I am trying to implement an account provider with no success..I hope someone
could help me please..

First,  this is my service and AccountAuthenticator  class

namespace test
{
public class AccountAuthenticatorService : Service
{
private static AccountAuthenticator  sAccountAuthenticator = null;

public static string ACCOUNT_TYPE = "com.test.account";
public static string ACCOUNT_NAME = "test";
private Context _context;

public AccountAuthenticatorService(Context _context)
: base()
{
this._context = _context;
}


public override IBinder OnBind(Intent intent)
{
IBinder ret = null;
if (intent.Action ==
Android.Accounts.AccountManager.ActionAuthenticatorIntent)
ret = getAuthenticator().IBinder;
return ret;
}

private AccountAuthenticator  getAuthenticator()
{
if (sAccountAuthenticator == null)
sAccountAuthenticator = new AccountAuthenticator
(this._context);
return sAccountAuthenticator;
}
}


public class AccountAuthenticator  :
Android.Accounts.AbstractAccountAuthenticator
{
private Context mContext;

public AccountAuthenticator(Context context)
: base(context)
{
mContext = context;
}

/*
 *  The user has requested to add a new account to the system.  We
return an intent that will launch our login screen if the user has not
logged in yet,
 *  otherwise our activity will just pass the user's credentials on
to the account manager.
 */

public override Bundle
AddAccount(Android.Accounts.AccountAuthenticatorResponse response, string
accountType, string authTokenType, string[] requiredFeatures, Bundle
options)
{
try
{
Bundle result;
Intent intent;

intent = new Intent(this.mContext,
typeof(eGestionaMobile.Actividades.Login));

   
intent.PutExtra(AccountManager.KeyAccountAuthenticatorResponse, response);

result = new Bundle();
result.PutParcelable(AccountManager.KeyIntent, intent);

return result;
}
catch (Exception ex)
{
throw ex;
}
}
}

Second, my AndroidManifest



  
  



  

Third, authenticator xml in resources --> Xml


http://schemas.android.com/apk/res/android";
android:accountType="com.test.account"
android:icon="@drawable/icon"
android:smallIcon="@drawable/icon"
android:label="egestionamobile"
android:accountPreferences="@xml/account_preferences"
   />


4Th, My login activity


On my login button I have..

 _account = new Account(AccountAuthenticatorService.ACCOUNT_NAME, 
AccountAuthenticatorService.ACCOUNT_TYPE);
_accountmanager = AccountManager.FromContext(this);

Bundle _datosUsuario = new Bundle();
_datosUsuario.PutString("test", _usuario);

bool _accountCreated =
_accountmanager.AddAccountExplicitly(_account, null, _datosUsuario);


The error it gives me is "caller uid  is different than the
authentication uid"

I have been looking for some info and as I have seen.. it might be my
account type don`t match with my authenticators.xml.. but it`s the same..

I have debugg it and it doesn´t come in my service so I think my manifest
service does not link with my service...

Any ideas about all this? Thanks in advance!!



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Android-Account-Provider-tp5711848.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid