Re: [mono-android] Error using Google Play Services (Gingerbread)

2014-02-20 Thread Francesco Colombo
Thanks a lot! It fixed the problem!


On Wed, Feb 19, 2014 at 4:55 PM, Dean Ellis  wrote:

> You need to increase the Java heap size, the java side of the google play
> component needs a fair chunk of memory to compile.
>
> You can do this in Xamarin Studio on the projects Android Build->Advanced
> tab, there is a box to enter the Java heap size. I have this set to 500M
> If you are using visual studio a similar setting exists on the Application
> property page.
>
>
> On Wed, Feb 19, 2014 at 3:12 PM, Francesco Colombo <
> francesco.colo...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm trying to use the Google Play Services. I've downloaded the component
>> but when I compile i get this error
>>
>> Tool /usr//bin/java execution started with arguments: -jar
>> /Developer/SDKs/android-sdk-macosx/build-tools/19.0.0//lib/dx.jar
>> --no-strict --dex --output=obj/Debug/android/bin/classes.dex
>> obj/Debug/android/bin/classes
>> /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v4.0/mono.android.jar
>> /Users/francesco/Develop/IFIS/Rendimax/trunk/Rendimax.ThirdParty/Binaries/Google/18/content/support/v7/appcompat/libs/android-support-v7-appcompat.jar
>> /Users/francesco/Develop/IFIS/Rendimax/trunk/Rendimax.ThirdParty/Binaries/Google/18/content/support/v4/android-support-v4.jar
>> /Users/francesco/Develop/IFIS/Rendimax/trunk/Rendimax.ThirdParty/Binaries/Google/13/content/google-play-services/libproject/google-play-services_lib/libs/google-play-services.jar
>>  UNEXPECTED TOP-LEVEL ERROR:
>> java.lang.OutOfMemoryError: Java heap space
>>  at java.util.TreeMap.put(TreeMap.java:554)
>> at
>> com.android.dx.dex.file.FieldIdsSection.intern(FieldIdsSection.java:108)
>>  at
>> com.android.dx.dex.cf.CfTranslator.processFields(CfTranslator.java:201)
>> at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:138)
>>  at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:94)
>> at com.android.dx.command.dexer.Main.processClass(Main.java:682)
>>  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
>> at com.android.dx.command.dexer.Main.access$600(Main.java:78)
>>  at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
>> at
>> com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
>>  at
>> com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
>> at
>> com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
>>  at com.android.dx.command.dexer.Main.processOne(Main.java:596)
>> at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
>>  at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
>> at com.android.dx.command.dexer.Main.run(Main.java:230)
>>  at com.android.dx.command.dexer.Main.main(Main.java:199)
>> at com.android.dx.command.Main.main(Main.java:103)
>>
>> ___
>> 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] Backup app data with BackupManager

2014-02-20 Thread Igor Velikorossov
Google provides data backup service (
https://developer.android.com/guide/topics/data/backup.html), which I'm
trying to take advantage of.

I followed the instructions, but I can't seem to get it working. I've done
the following:

   1. Registered for the backup service and got the key
   2.

   Updated the manifest.xml

   

   
   

   3.

   Extended BackupAgentHelper

   namespace App.Namespace{
   public class MyBackupAgentHelper : BackupAgentHelper
   {
   public override void OnCreate()
   {
   base.OnCreate();
   var fbh = new FileBackupHelper(this,
this.GetDatabasePath(Const.Database.Name).AbsolutePath);
   this.AddHelper("DATABASE", fbh);
   }
   }}

   4.

   In my database helper I initialise BackupManager and upon data change
   call this.backupManager.DataChanged();

And it doesn't seem to work as expected - when I uninstall and reinstall
the app the database I expect to be backup isn't getting restored.

I have also tried instigating backup manually (as per instructions
https://developer.android.com/guide/topics/data/backup.html#Testing) to no
avail.

Any help is appreciated. Thanks
___
Monodroid mailing list
Monodroid@lists.ximian.com

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