Re: [mono-android] Library Layouts and Drawables

2013-01-08 Thread Jonathan Chapman
Thanks,
 
Do you still need me to file the bug or will handle that?
 

Jonathan Chapman

 



From: Atsushi Eno [via Mono for Android]
[mailto:ml-node+s1047100n5712714...@n5.nabble.com] 
Sent: Tuesday, January 08, 2013 1:45 AM
To: Jonathan Chapman
Subject: Re: Library Layouts and Drawables


Okay, I think I found the cause of the problem. In Android project, you 
always have to name those resource files in lowercase. We somehow 
extended this in application build, but that does not apply to library 
projects. 
I assume it is doable (it *seems* like it's *certainly* doable, but it's

not that simple), but until it is resolved in any form (preserve IDs in 
library sources, or explicitly prohibit such resource file namings in 
our build step), please stick to "Android conformant" resource naming, 
which is foo_bar_baz not FooBarBaz. 

(Those uppercase characters are rejected in Android's ant resource 
builder i.e. aapt so they never appeared in Java binding projects.) 

Atsushi Eno 

Atsushi Eno wrote: 

> It is hard to confirm and tell what happened without the actual code. 
> Could you  file a bug and attach your project there so that we can 
> examine? 
> 
> Atsushi Eno 
> 
> Jonathan Chapman wrote: 
>> We had a large library of resources that we used to just link in
because 
>> Android resources could not be in libraries.  I just upgraded to the 
>> latest 
>> and have spent all day converting the library to a true library.   
>> I've just 
>> gotten to the point where everything seems fine except in the 
>> UpdateIdValues 
>> where it does the mapping it's trying to map something like 
>> 
>> Library.Drawable.GreyLine = Application.Resource.Drawable.GreyLine; 
>> 
>> However in Application the resource id was generated as all lower
case 
>> instead of mixed case.  Mixed Case would be correct.  Please confirm 
>> this is 
>> a bug and then I'll temporarily change my library resource to be all 
>> lower 
>> case. 
>> 
>> Note that some things like Strings, styles and id's work.  Just
Layours, 
>> Menu, and Drawables do not. 
>> 
>> Regards, 
>> Jonathan 
>> 
>> 
>> 
>> -- 
>> View this message in context: 
>>
http://mono-for-android.1047100.n5.nabble.com/Library-Layouts-and-Drawab
les-tp5712710.html
>> Sent from the Mono for Android mailing list archive at Nabble.com. 
>> ___ 
>> Monodroid mailing list 
>> [hidden email] 
>> 
>> UNSUBSCRIBE INFORMATION: 
>> http://lists.ximian.com/mailman/listinfo/monodroid
>> 
>> 
>> 
> 
> ___ 
> Monodroid mailing list 
> [hidden email] 
> 
> UNSUBSCRIBE INFORMATION: 
> http://lists.ximian.com/mailman/listinfo/monodroid
> 
> 
> 

___ 
Monodroid mailing list 
[hidden email] 

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





If you reply to this email, your message will be added to the discussion
below:
http://mono-for-android.1047100.n5.nabble.com/Library-Layouts-and-Drawab
les-tp5712710p5712714.html 
To unsubscribe from Library Layouts and Drawables, click here
 .
NAML
  




--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Library-Layouts-and-Drawables-tp5712710p5712715.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] Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread John Murray
 

Can anyone help here - I was experimenting trying to devise a way I could
use Google Maps API to get a Lat and Long from a touch on a map.

 

1) am I right in saying that in Mono For Android I need a map api

 

2) if so I have followed the advice on Xamarin site
http://docs.xamarin.com/Android/Guides/Platform_Features/Maps_and_Location/O
btaining_a_Google_Maps_API_Key 

viz 

step 1  

 Obtain signing key fingerprint

keytool.exe -list -alias androiddebugkey -keystore debug.keystore -storepass
android -keypass android

this appears  to produce a valid fingerprint
for the debug

 
58:90:25:17:81:61:0F:77:04:22:32:70:05:A3:8A:1D:B4:76:CA:8A

the only oddity I notice is that on the Xamarin documentation example the
key is preceded by (MD5) whereas my key says (SHA1) 

 

step 2 

enter the resulting key in
https://developers.google.com/maps/documentation/android/v1/maps-api-signup

 

Unfortunately I get an invalid message

"The fingerprint that you entered is not valid. Please press the Back button
on your browser and enter a valid certificate fingerprint"

 

I notice this is V1 and it is deprecated from 3 December 2012 and will
disappear from March 2013 but that means it should still work right now

So that can't be the problem 

 

I have tried going to the V2 console   here
https://code.google.com/apis/console/#project:326860401265:access

but entering the fingerprint after pressing the 'create new Android key'
still give 'Your input was invalid 

 

So can anyone give me any pointers please?

Is there any easier way to achieve the getting lat and long from a map
without all this palaver?

 

John murray

 

 

 

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] OutOfMemoryError

2013-01-08 Thread Sayed Arian Kooshesh
you need to compress that bitmap, my boy!

On Mon, Jan 7, 2013 at 3:21 PM,  wrote:

> Hi,
>
> I have app with several common images on ui. When I navigate between
> activities some times throw exception.
> I have standard emulator with 256mb ram.
> What is cause of this?
>
> 144000-byte external allocation too large for this process.
> VM won't let us allocate 144000 bytes
> Shutting down VM
> FATAL EXCEPTION: main
> java.lang.OutOfMemoryError: bitmap size exceeds VM budget
> at android.graphics.Bitmap.**nativeCreate(Native Method)
> at android.graphics.Bitmap.**createBitmap(Bitmap.java:477)
> at com.tapfortap.AdView.scale(**AdView.java:403)
> at com.tapfortap.AdView.onDraw(**AdView.java:164)
> at android.view.View.draw(View.**java:6880)
> at android.view.ViewGroup.**drawChild(ViewGroup.java:1646)
> at android.view.ViewGroup.**dispatchDraw(ViewGroup.java:**1373)
> at android.view.View.draw(View.**java:6883)
> at android.view.ViewGroup.**drawChild(ViewGroup.java:1646)
> at android.view.ViewGroup.**dispatchDraw(ViewGroup.java:**1373)
> at android.view.ViewGroup.**drawChild(ViewGroup.java:1644)
> at android.view.ViewGroup.**dispatchDraw(ViewGroup.java:**1373)
> at android.view.ViewGroup.**drawChild(ViewGroup.java:1644)
> at android.view.ViewGroup.**dispatchDraw(ViewGroup.java:**1373)
> at android.view.View.draw(View.**java:6883)
> at android.widget.FrameLayout.**draw(FrameLayout.java:357)
> at android.view.ViewGroup.**drawChild(ViewGroup.java:1646)
> at android.view.ViewGroup.**dispatchDraw(ViewGroup.java:**1373)
> at android.view.ViewGroup.**drawChild(ViewGroup.java:1644)
> at android.view.ViewGroup.**dispatchDraw(ViewGroup.java:**1373)
> at android.view.View.draw(View.**java:6883)
> at android.widget.FrameLayout.**draw(FrameLayout.java:357)
> at com.android.internal.policy.**impl.PhoneWindow$DecorView.**
> draw(PhoneWindow.java:1862)
> at android.view.ViewRoot.draw(**ViewRoot.java:1522)
> at android.view.ViewRoot.**performTraversals(ViewRoot.**java:1258)
> at android.view.ViewRoot.**handleMessage(ViewRoot.java:**1859)
> at android.os.Handler.**dispatchMessage(Handler.java:**99)
> at android.os.Looper.loop(Looper.**java:123)
> at android.app.ActivityThread.**main(ActivityThread.java:3683)
> at java.lang.reflect.Method.**invokeNative(Native Method)
> at java.lang.reflect.Method.**invoke(Method.java:507)
> at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run(
> **ZygoteInit.java:839)
> at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**
> java:597)
> at dalvik.system.NativeStart.**main(Native Method)
> Sending signal. PID: 1903 SIG: 9
> __**_
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/**mailman/listinfo/monodroid
>



-- 
Extreme Knowledge is not something for which he programs a computer but for
which his computer is programming him.

-Wozniak


   - if my programming advice has helped you, feel free to donate to :




___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Library Layouts and Drawables

2013-01-08 Thread Atsushi Eno

Ah, no worries, I have already filed one:
https://bugzilla.xamarin.com/show_bug.cgi?id=9370

Thanks,
Atsushi Eno

Jonathan Chapman wrote:

Thanks,
Do you still need me to file the bug or will handle that?

*Jonathan Chapman*



*From:* Atsushi Eno [via Mono for Android] [mailto:[hidden email]]
*Sent:* Tuesday, January 08, 2013 1:45 AM
*To:* Jonathan Chapman
*Subject:* Re: Library Layouts and Drawables

Okay, I think I found the cause of the problem. In Android project, you
always have to name those resource files in lowercase. We somehow
extended this in application build, but that does not apply to library
projects.
I assume it is doable (it *seems* like it's *certainly* doable, but it's
not that simple), but until it is resolved in any form (preserve IDs in
library sources, or explicitly prohibit such resource file namings in
our build step), please stick to "Android conformant" resource naming,
which is foo_bar_baz not FooBarBaz.

(Those uppercase characters are rejected in Android's ant resource
builder i.e. aapt so they never appeared in Java binding projects.)

Atsushi Eno

Atsushi Eno wrote:

> It is hard to confirm and tell what happened without the actual code.
> Could you  file a bug and attach your project there so that we can
> examine?
>
> Atsushi Eno
>
> Jonathan Chapman wrote:
>> We had a large library of resources that we used to just link in 
because

>> Android resources could not be in libraries.  I just upgraded to the
>> latest
>> and have spent all day converting the library to a true library.
>> I've just
>> gotten to the point where everything seems fine except in the
>> UpdateIdValues
>> where it does the mapping it's trying to map something like
>>
>> Library.Drawable.GreyLine = Application.Resource.Drawable.GreyLine;
>>
>> However in Application the resource id was generated as all lower case
>> instead of mixed case.  Mixed Case would be correct.  Please confirm
>> this is
>> a bug and then I'll temporarily change my library resource to be all
>> lower
>> case.
>>
>> Note that some things like Strings, styles and id's work.  Just 
Layours,

>> Menu, and Drawables do not.
>>
>> Regards,
>> Jonathan
>>
>>
>>
>> --
>> View this message in context:
>> 
http://mono-for-android.1047100.n5.nabble.com/Library-Layouts-and-Drawables-tp5712710.html

>> Sent from the Mono for Android mailing list archive at Nabble.com.
>> ___
>> Monodroid mailing list
>> [hidden email]
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/mailman/listinfo/monodroid
>>
>>
>>
>
> ___
> Monodroid mailing list
> [hidden email]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
>
___
Monodroid mailing list
[hidden email]

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



If you reply to this email, your message will be added to the 
discussion below:
http://mono-for-android.1047100.n5.nabble.com/Library-Layouts-and-Drawables-tp5712710p5712714.html 


To unsubscribe from Library Layouts and Drawables, click here.
NAML 
 




View this message in context: RE: Library Layouts and Drawables 

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] Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread Atsushi Eno
You can reuse the latest Google Maps v2 binding from Tom. It is publicly 
available in monodroid-samples:

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

He also wrote some notes on how to get an API key.

some more comments inline:

John Murray wrote:


Can anyone help here - I was experimenting trying to devise a way I 
could use Google Maps API to get a Lat and Long from a touch on a map.


1) am I right in saying that in Mono For Android I need a map api

2) if so I have followed the advice on Xamarin site 
http://docs.xamarin.com/Android/Guides/Platform_Features/Maps_and_Location/Obtaining_a_Google_Maps_API_Key 



viz

step 1

Obtain signing key fingerprint

keytool.exe -list -alias androiddebugkey -keystore debug.keystore 
-storepass android -keypass android


this appears to produce a valid fingerprint for the debug

58:90:25:17:81:61:0F:77:04:22:32:70:05:A3:8A:1D:B4:76:CA:8A

the only oddity I notice is that on the Xamarin documentation example 
the key is preceded by (MD5) whereas my key says (SHA1)




You need to add -v to your keytool argument. (It is documented on the 
android website linked from Tom's README.)



step 2

enter the resulting key in 
https://developers.google.com/maps/documentation/android/v1/maps-api-signup


Unfortunately I get an invalid message

"The fingerprint that you entered is not valid. Please press the Back 
button on your browser and enter a valid certificate fingerprint"


I notice this is V1 and it is deprecated from 3 December 2012 and will 
disappear from March 2013 but that means it should still work right now


So that can’t be the problem

I have tried going to the V2 console here 
https://code.google.com/apis/console/#project:326860401265:access


but entering the fingerprint after pressing the 'create new Android 
key' still give 'Your input was invalid




Yes it is invalid, now they only accepts SHA-1, not MD5.

HTH,
Atsushi Eno


So can anyone give me any pointers please?

Is there any easier way to achieve the getting lat and long from a map 
without all this palaver?


John murray



___
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] Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread John Murray
Many thanks Atsushi
Using the -v switch I discovered that the debug.keystore generated
fingerprint is valid onlyfor 36days after the date of the debug.keystore
file
As teh one in users\me\.android is date may 2010 then the generated
fingerprint is out of date.

Any idea how I can get an up to date debug.keystore file 
The android sdk manager is up to date

Tia
John Murray 

-Original Message-
From: monodroid-boun...@lists.ximian.com
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Atsushi Eno
Sent: 08 January 2013 13:42
To: Discussions related to Mono for Android
Subject: Re: [mono-android] Google maps with MfA need for api key and
getting lat and long

You can reuse the latest Google Maps v2 binding from Tom. It is publicly
available in monodroid-samples:
https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo
_v2

He also wrote some notes on how to get an API key.

some more comments inline:

John Murray wrote:
>
> Can anyone help here - I was experimenting trying to devise a way I 
> could use Google Maps API to get a Lat and Long from a touch on a map.
>
> 1) am I right in saying that in Mono For Android I need a map api
>
> 2) if so I have followed the advice on Xamarin site 
> http://docs.xamarin.com/Android/Guides/Platform_Features/Maps_and_Loca
> tion/Obtaining_a_Google_Maps_API_Key
>
>
> viz
>
> step 1
>
> Obtain signing key fingerprint
>
> keytool.exe -list -alias androiddebugkey -keystore debug.keystore 
> -storepass android -keypass android
>
> this appears to produce a valid fingerprint for the debug
>
> 58:90:25:17:81:61:0F:77:04:22:32:70:05:A3:8A:1D:B4:76:CA:8A
>
> the only oddity I notice is that on the Xamarin documentation example 
> the key is preceded by (MD5) whereas my key says (SHA1)
>

You need to add -v to your keytool argument. (It is documented on the
android website linked from Tom's README.)

> step 2
>
> enter the resulting key in
> https://developers.google.com/maps/documentation/android/v1/maps-api-s
> ignup
>
> Unfortunately I get an invalid message
>
> "The fingerprint that you entered is not valid. Please press the Back 
> button on your browser and enter a valid certificate fingerprint"
>
> I notice this is V1 and it is deprecated from 3 December 2012 and will 
> disappear from March 2013 but that means it should still work right 
> now
>
> So that can't be the problem
>
> I have tried going to the V2 console here 
> https://code.google.com/apis/console/#project:326860401265:access
>
> but entering the fingerprint after pressing the 'create new Android 
> key' still give 'Your input was invalid
>

Yes it is invalid, now they only accepts SHA-1, not MD5.

HTH,
Atsushi Eno

> So can anyone give me any pointers please?
>
> Is there any easier way to achieve the getting lat and long from a map 
> without all this palaver?
>
> John murray
>
>
>
> ___
> 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


Re: [mono-android] Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread John Murray
Many thanks Atsushi
Using the -v switch I discovered that the debug.keystore generated
fingerprint is valid onlyfor 36days after the date of the debug.keystore
file
As teh one in users\me\.android is date may 2010 then the generated
fingerprint is out of date.

Any idea how I can get an up to date debug.keystore file 
The android sdk manager is up to date

Tia
John Murray 

-Original Message-
From: monodroid-boun...@lists.ximian.com
[mailto:monodroid-boun...@lists.ximian.com] On Behalf Of Atsushi Eno
Sent: 08 January 2013 13:42
To: Discussions related to Mono for Android
Subject: Re: [mono-android] Google maps with MfA need for api key and
getting lat and long

You can reuse the latest Google Maps v2 binding from Tom. It is publicly
available in monodroid-samples:
https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo
_v2

He also wrote some notes on how to get an API key.

some more comments inline:

John Murray wrote:
>
> Can anyone help here - I was experimenting trying to devise a way I 
> could use Google Maps API to get a Lat and Long from a touch on a map.
>
> 1) am I right in saying that in Mono For Android I need a map api
>
> 2) if so I have followed the advice on Xamarin site 
> http://docs.xamarin.com/Android/Guides/Platform_Features/Maps_and_Loca
> tion/Obtaining_a_Google_Maps_API_Key
>
>
> viz
>
> step 1
>
> Obtain signing key fingerprint
>
> keytool.exe -list -alias androiddebugkey -keystore debug.keystore 
> -storepass android -keypass android
>
> this appears to produce a valid fingerprint for the debug
>
> 58:90:25:17:81:61:0F:77:04:22:32:70:05:A3:8A:1D:B4:76:CA:8A
>
> the only oddity I notice is that on the Xamarin documentation example 
> the key is preceded by (MD5) whereas my key says (SHA1)
>

You need to add -v to your keytool argument. (It is documented on the
android website linked from Tom's README.)

> step 2
>
> enter the resulting key in
> https://developers.google.com/maps/documentation/android/v1/maps-api-s
> ignup
>
> Unfortunately I get an invalid message
>
> "The fingerprint that you entered is not valid. Please press the Back 
> button on your browser and enter a valid certificate fingerprint"
>
> I notice this is V1 and it is deprecated from 3 December 2012 and will 
> disappear from March 2013 but that means it should still work right 
> now
>
> So that can't be the problem
>
> I have tried going to the V2 console here 
> https://code.google.com/apis/console/#project:326860401265:access
>
> but entering the fingerprint after pressing the 'create new Android 
> key' still give 'Your input was invalid
>

Yes it is invalid, now they only accepts SHA-1, not MD5.

HTH,
Atsushi Eno

> So can anyone give me any pointers please?
>
> Is there any easier way to achieve the getting lat and long from a map 
> without all this palaver?
>
> John murray
>
>
>
> ___
> 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


Re: [mono-android] Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread Jonathan Pryor
On Jan 8, 2013, at 9:37 AM, John Murray  wrote:
> Any idea how I can get an up to date debug.keystore file

You are now entering a maze of twisty passages, all alike. Your sanity is 
likely to disappear.

First of all, where'd debug.keystore come from? Mono for Android auto-generates 
it during the build process if it doesn't already exist (because all apps need 
to be signed to get them onto the device). If you need a new one, delete it and 
a new one will be auto generated:

OSX: $HOME/.local/share/Xamarin/Mono for Android/debug.keystore
Windows: %LOCALAPPDATA%\Xamarin\Mono for Android\debug.keystore

HOWEVER, that's only part of the problem, and this is where things get crazy.

Since debug.keystore is automatically created, it will DIFFER between every 
machine that Mono for Android is installed on. This is fine outside of Google 
Maps, but when you need to use Google Maps (and it's API key) and you're on a 
team this will result in pain, suffering, and misery (because only one person 
will be able to build the app!).

So when it comes to Google Maps, you DO NOT want to use the default 
debug.keystore file!

Instead, create a new one:


http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Creating_a_Private_Keystore

Add it to your source repo, and update your project so that the included 
keystore is used instead of the default keystore:


http://docs.xamarin.com/Android/Guides/Advanced_Topics/Build_Process#Signing

http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Permanently_Use_A_Different_Keystore

This allows things to be "sane" in a team environment, but the security 
implications are terrible: you have a (private!) keystore in a "public" 
(presumably internal) source control repo, and the password + alias + etc. are 
stored in plain text in your .csproj.

This is NOT SECURE. It WORKS, but it's not secure. (Related note: this might 
not be "that bad"; if someone can access the in-repo keystore, they can also 
access all the source included in that repo, which is presumably something you 
don't want easily accessible either...)

Bear that in mind. ;-)

For Release apps, you'll want (need) to use a DIFFERENT keystore file, 
protected with actual security precautions (e.g. not stored on a network 
accessible computer), and then MANUALLY sign your Release app with this Release 
keystore:


http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Signing_the_APK_in_Visual_Studio_(Mono_for_Android_4.2.6_or_higher)

Of course, since your Release app is using a different keystore file, it'll 
also have a different Google Maps API key (argh!). You'll probably thus want to 
store the API key as a String resource, and have per-build string resources 
(one for Debug builds, one for Release builds):


http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Storing_Google_Maps_API_Keys

Related/different idea to the above: to your Project, add two files: 
Resources\Values\ApiKey-Release.xml and Resources\Values\ApiKey-Debug.xml:


...


Update "..." with the appropriate value (Debug key in the -Debug file, Release 
key in the -Release file). Add one to your .csproj via the IDE, close the 
project, then manually edit the .csproj to replace the ApiKey-*.xml entry with:



This will make the API key a per-configuration value: build Debug, and you'll 
use the ApiKey-Debug.xml file (and thus Debug key), build Release and you'll 
use the ApiKey-Release.xml file (and thus Release key). This has the added 
benefit that your layout XML can "just" use @string/google_maps_api_key, 
removing the need to have per-profile Layout files.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Recall: Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread John Murray
John Murray would like to recall the message, "[mono-android] Google maps
with MfA need for api key and getting lat and long".
<>___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread Tom Opgenorth
Also note that with Google Maps for Android v2, it's possible to share one
API key with multiple apps/SHA1 fingerprints via the Google API's Console.
This means you could use both your release keystore and your debug keystore
with the one API key.


On Tue, Jan 8, 2013 at 8:13 AM, Jonathan Pryor  wrote:

> On Jan 8, 2013, at 9:37 AM, John Murray  wrote:
> > Any idea how I can get an up to date debug.keystore file
>
> You are now entering a maze of twisty passages, all alike. Your sanity is
> likely to disappear.
>
> First of all, where'd debug.keystore come from? Mono for Android
> auto-generates it during the build process if it doesn't already exist
> (because all apps need to be signed to get them onto the device). If you
> need a new one, delete it and a new one will be auto generated:
>
> OSX: $HOME/.local/share/Xamarin/Mono for Android/debug.keystore
> Windows: %LOCALAPPDATA%\Xamarin\Mono for Android\debug.keystore
>
> HOWEVER, that's only part of the problem, and this is where things get
> crazy.
>
> Since debug.keystore is automatically created, it will DIFFER between
> every machine that Mono for Android is installed on. This is fine outside
> of Google Maps, but when you need to use Google Maps (and it's API key) and
> you're on a team this will result in pain, suffering, and misery (because
> only one person will be able to build the app!).
>
> So when it comes to Google Maps, you DO NOT want to use the default
> debug.keystore file!
>
> Instead, create a new one:
>
>
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Creating_a_Private_Keystore
>
> Add it to your source repo, and update your project so that the included
> keystore is used instead of the default keystore:
>
>
> http://docs.xamarin.com/Android/Guides/Advanced_Topics/Build_Process#Signing
>
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Permanently_Use_A_Different_Keystore
>
> This allows things to be "sane" in a team environment, but the security
> implications are terrible: you have a (private!) keystore in a "public"
> (presumably internal) source control repo, and the password + alias + etc.
> are stored in plain text in your .csproj.
>
> This is NOT SECURE. It WORKS, but it's not secure. (Related note: this
> might not be "that bad"; if someone can access the in-repo keystore, they
> can also access all the source included in that repo, which is presumably
> something you don't want easily accessible either...)
>
> Bear that in mind. ;-)
>
> For Release apps, you'll want (need) to use a DIFFERENT keystore file,
> protected with actual security precautions (e.g. not stored on a network
> accessible computer), and then MANUALLY sign your Release app with this
> Release keystore:
>
>
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Signing_the_APK_in_Visual_Studio_(Mono_for_Android_4.2.6_or_higher)
>
> Of course, since your Release app is using a different keystore file,
> it'll also have a different Google Maps API key (argh!). You'll probably
> thus want to store the API key as a String resource, and have per-build
> string resources (one for Debug builds, one for Release builds):
>
>
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Storing_Google_Maps_API_Keys
>
> Related/different idea to the above: to your Project, add two files:
> Resources\Values\ApiKey-Release.xml and Resources\Values\ApiKey-Debug.xml:
>
> 
> ...
> 
>
> Update "..." with the appropriate value (Debug key in the -Debug file,
> Release key in the -Release file). Add one to your .csproj via the IDE,
> close the project, then manually edit the .csproj to replace the
> ApiKey-*.xml entry with:
>
>  Include="Resources\Values\ApiKey-$(Configuration).xml" />
>
> This will make the API key a per-configuration value: build Debug, and
> you'll use the ApiKey-Debug.xml file (and thus Debug key), build Release
> and you'll use the ApiKey-Release.xml file (and thus Release key). This has
> the added benefit that your layout XML can "just" use
> @string/google_maps_api_key, removing the need to have per-profile Layout
> files.
>
>  - Jon
>
> ___
> 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] Google maps with MfA need for api key and getting lat and long

2013-01-08 Thread Karl Heinz Brehme Arredondo
Is needed to pay Google about USD 15000 annually up to 150 users on Android?

Back to April 2011 we ask them for license to put Google Maps on our Backoffice 
application to see some reports with maps because the key isn't for free for 
non public web sites/applications, making it inviable on an enterprise web app 
and showing us how things aren't for free in real life.

Karl

Em 08/01/2013, às 13:55, Tom Opgenorth escreveu:

> Also note that with Google Maps for Android v2, it's possible to share one 
> API key with multiple apps/SHA1 fingerprints via the Google API's Console. 
> This means you could use both your release keystore and your debug keystore 
> with the one API key.  
> 
> 
> On Tue, Jan 8, 2013 at 8:13 AM, Jonathan Pryor  wrote:
> On Jan 8, 2013, at 9:37 AM, John Murray  wrote:
> > Any idea how I can get an up to date debug.keystore file
> 
> You are now entering a maze of twisty passages, all alike. Your sanity is 
> likely to disappear.
> 
> First of all, where'd debug.keystore come from? Mono for Android 
> auto-generates it during the build process if it doesn't already exist 
> (because all apps need to be signed to get them onto the device). If you need 
> a new one, delete it and a new one will be auto generated:
> 
> OSX: $HOME/.local/share/Xamarin/Mono for Android/debug.keystore
> Windows: %LOCALAPPDATA%\Xamarin\Mono for Android\debug.keystore
> 
> HOWEVER, that's only part of the problem, and this is where things get crazy.
> 
> Since debug.keystore is automatically created, it will DIFFER between every 
> machine that Mono for Android is installed on. This is fine outside of Google 
> Maps, but when you need to use Google Maps (and it's API key) and you're on a 
> team this will result in pain, suffering, and misery (because only one person 
> will be able to build the app!).
> 
> So when it comes to Google Maps, you DO NOT want to use the default 
> debug.keystore file!
> 
> Instead, create a new one:
> 
> 
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Creating_a_Private_Keystore
> 
> Add it to your source repo, and update your project so that the included 
> keystore is used instead of the default keystore:
> 
> 
> http://docs.xamarin.com/Android/Guides/Advanced_Topics/Build_Process#Signing
> 
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Permanently_Use_A_Different_Keystore
> 
> This allows things to be "sane" in a team environment, but the security 
> implications are terrible: you have a (private!) keystore in a "public" 
> (presumably internal) source control repo, and the password + alias + etc. 
> are stored in plain text in your .csproj.
> 
> This is NOT SECURE. It WORKS, but it's not secure. (Related note: this might 
> not be "that bad"; if someone can access the in-repo keystore, they can also 
> access all the source included in that repo, which is presumably something 
> you don't want easily accessible either...)
> 
> Bear that in mind. ;-)
> 
> For Release apps, you'll want (need) to use a DIFFERENT keystore file, 
> protected with actual security precautions (e.g. not stored on a network 
> accessible computer), and then MANUALLY sign your Release app with this 
> Release keystore:
> 
> 
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Signing_the_APK_in_Visual_Studio_(Mono_for_Android_4.2.6_or_higher)
> 
> Of course, since your Release app is using a different keystore file, it'll 
> also have a different Google Maps API key (argh!). You'll probably thus want 
> to store the API key as a String resource, and have per-build string 
> resources (one for Debug builds, one for Release builds):
> 
> 
> http://docs.xamarin.com/Android/Guides/Deployment%2C_Testing%2C_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release#Storing_Google_Maps_API_Keys
> 
> Related/different idea to the above: to your Project, add two files: 
> Resources\Values\ApiKey-Release.xml and Resources\Values\ApiKey-Debug.xml:
> 
> 
> ...
> 
> 
> Update "..." with the appropriate value (Debug key in the -Debug file, 
> Release key in the -Release file). Add one to your .csproj via the IDE, close 
> the project, then manually edit the .csproj to replace the ApiKey-*.xml entry 
> with:
> 
>  Include="Resources\Values\ApiKey-$(Configuration).xml" />
> 
> This will make the API key a per-configuration value: build Debug, and you'll 
> use the ApiKey-Debug.xml file (and thus Debug key), build Release and you'll 
> use the ApiKey-Release.xml file (and thus Release key). This has the added 
> benefit that your layout XML can "just" use @string/google_maps_api_key, 
> removing the

[mono-android] Upgrade to 4.4.54 and lost activation

2013-01-08 Thread Steve Sharrock
Another activation-issue. I took the automatic update in VS2010 and I was no
longer activated. I entered the activation code which was accepted by the
activate dialog; but, still no luck.

 

Jon, I know you usually ask for a copy of the license file attached to a
private email. I have that ready to send I'll email it after this post.

 

Thanks,

Steve Sharrock

st...@sharkcode.com

 

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Installation with SDK Manager 21

2013-01-08 Thread Jonathan Pryor
On Jan 4, 2013, at 5:35 PM, Stephan Steiner  wrote:
> It starts with an outdated Java version (1.6r31) which contains a bunch of 
> pretty bad security issues.

I'll look into seeing if we can install a more recent Java 6 version. Thank you 
for pointing this out.

> Then it continues with the Android SDK Manager release 20 - and then 
> downloads a bunch of stuff for API levels that I couldn't care less for (I 
> only target API 15 and above).

This is the problem with making things "simple": _something_ has to be 
installed, and given that a huge number of devices still only have 2.3 
installing only recent versions seems silly... That said, we should stop 
installing the older API levels; who uses API 4 anymore?

> I can work around the outdated java by simply installing the latest 1.6 
> version prior to launching the xamarin installer, but I haven't found a way 
> to get it to use my already installed SDK Manager release 21 with just the 
> features I'm interested in.

Use the .exe-based Android SDK installer. That creates a registry entry which 
our installer uses to see if you've already installed the Android SDK.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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