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

2013-01-11 Thread john Murray
Atsushi
A follow on - I discovered a debug.keystore in the
users\me\appadata\local\xamarin folder which was dated 20/08/2011 which when
used to generate a fingerprint had a validity out to 2040 
But even this new fingerprint is giving invalid code on both Google api V1
and V2 console
I am using SHA1
Any ideas?


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

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


___
Monodroid mailing list
Monodroid@lists.ximian.com

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


[mono-android] Management of Fragment transactions in back stack (fragments overlapping)

2013-01-11 Thread Arvis Lieģenieks
Scenario what i'm trying to achieve:
1. Loading activity with two frame containers (for list of items and for
details).
2. At the app launch time add listFragment in listFrame and some initial
infoFragment in detailsFrame containers.
3. Navigating through list items without adding each detail transaction to
back stack (want to keep only infoFragment in stack).
4. As soon as user hit back button (navigate back) he falls back to intial
infoFragment what was added in launch time.
5. If sequential back navigation fallows then apps exit.

My code:
protected override void OnCreate(Bundle savedInstanceState)
{
...
var listFrag = new ListFragment();
var infoFrag = new InfoFragment();
var trans = FragmentManager.BeginTransaction();
trans.Add(Resource.Id.listFrame, listFrag);
trans.Add(Resource.Id.detailsFrame, infoFrag);
trans.Commit();
...
}

public void OnItemSelected(int id)
{
var detailsFrag = DetailFragment.NewInstance(id);
var trans = FragmentManager.BeginTransaction();
trans.Replace(Resource.Id.detailsFrame, detailsFrag);
if (FragmentManager.BackStackEntryCount == 0)
{
trans.AddToBackStack(null);
}
trans.Commit();
}

My problem:
After back button has been hit, infoFrag is overlapped with previous
detailFrag! Why?
And also i noticed strange getBackStackEntryCount() behaviour - it still
return zero even after commiting first transaction with addToBackStack().

Q on Stackoverflow:
http://stackoverflow.com/questions/14269350/how-to-keep-only-first-initial-fragment-in-back-stack-fragment-overlapping
http://stackoverflow.com/questions/12529499/problems-with-android-fragment-back-stack
___
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-11 Thread Tom Opgenorth
Are you seeing any "permission denied" messages in the console while your
application is running?

Another wild guess:
Are you sure that the debug.keystore you are using to sign the app is the
same one that you associated with the API Map Key? You can check out the
SHA1 fingerprint of your APK by first unzipping it, and then typing :

keytool -printcert -file META-INF/ANDROIDD.RSA

at the command line. Maybe just compare the two fingerprints to ensure that
are are the same.


On Tue, Jan 8, 2013 at 8:04 AM, john Murray  wrote:

> Atsushi
> A follow on - I discovered a debug.keystore in the
> users\me\appadata\local\xamarin folder which was dated 20/08/2011 which
> when
> used to generate a fingerprint had a validity out to 2040
> But even this new fingerprint is giving invalid code on both Google api V1
> and V2 console
> I am using SHA1
> Any ideas?
>
>
> -Original Message-
> From: monodroid-boun...@lists.ximian.com
> [mailto:monodroid-boun...@lists.ximian.com] On Behalf Of John Murray
> Sent: 08 January 2013 14:37
> To: 'Discussions related to Mono for Android'
> Subject: Re: [mono-android] Google maps with MfA need for api key and
> getting lat and long
>
> 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
>
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>



-- 
ht

Re: [mono-android] inflate exception

2013-01-11 Thread Jonathan Pryor
On Sep 6, 2012, at 4:03 PM, ghuoof  wrote:
> I'm having a similar problem and I'm completely stumped.  At this point I am 
> just trying to do some very simple stuff with fragments.

The problem is a type name mismatch; your fragment uses the class 
`com.goctsi.com.oti.eventslistfragment` (note the //fragment/@android:name 
attribute):

> http://schemas.android.com/apk/res/android";
>android:layout_width="fill_parent"
>android:layout_height="fill_parent"
>android:orientation="vertical" >
> 
>   android:name="com.goctsi.com.oti.eventslistfragment"
>   android:id ="@+id/eventslistfragment"
>   android:layout_width="fill_parent"
>   android:layout_height="fill_parent"
>/>
> 
> 

However your actual class name is `CTSi_Noti.eventslistfragment`:

> namespace CTSi_Noti
> {
>public class eventslistfragment : Fragment

`com.goctsi.com.oti.eventslistfragment` != `CTSi_Noti.eventslistfragment`, so 
that's why it fails.

> my package name is set to "com.goctsi.com.oti" so the fragment should be 
> "com.goctsi.com.oti.eventslistfragment" right?

No, the package name you set is the "package name" for the app. The package 
name for individual types within the app comes from the type's namespace, so a 
C# type of "CTSi_Noti.eventslistfragment" will create the Java ACW of 
"ctsi_noti.eventslistfragment" (lowercasing the namespace name to create the 
package name).

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

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


Re: [mono-android] Confusing Main Launcher Icon Behavior

2013-01-11 Thread craig
This occurs if I install the app through Visual Studio or if I use a 3rd
party installer.

I haven't tested yet but I'm hoping it doesn't happen when downloaded from
App Store.



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Confusing-Main-Launcher-Icon-Behavior-tp5712674p5712741.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] Catch all the exceptions

2013-01-11 Thread craig
Hi I am reading this for the first time and wondering if anything has changed
in the past year.

You wrote, "Unfortunately we don't have a good answer at this time."

Is that still the case or has the situation improved?  Thanks.



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Catch-all-the-exceptions-tp5165993p5712742.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