Android Question Google Analytics for Full and lite version?

NeverGiveUp2

Member
Licensed User
Hi guys,

is it possible to control 2 apps in 1 directory.

For example:

My app be4drive is a full version without any limitation.
My app be4drive Lite has some limitation.
So i have both projects in 1 directory. How can i use 2 different analytics.xml-files in this
directory.

Best regards from Germany with a happy new year for all of you.

Roland
 

DonManfred

Expert
Licensed User
You can use something like
B4X:
#CustomBuildAction: 1, c:\windows\system32\xcopy.exe, /R /Y ..\xy.xml res\pathtoxml\xy.xml
in your projects to copy the right xml to the right place when compiling your project.
Please note that the paths may be wrong... just wrote that out of my brain
 

DonManfred

Expert
Licensed User
i thought again over it and feel another solution MUCH MORE comfortable...

Create two resourcefolders in your projectdir. Then use in either your projects
B4X:
#AdditionalRes: ..\resourcefolderFULL
' and in the other project
#AdditionalRes: ..\resourcefolderLITE
place the line like in this example
B4X:
#Region  Project Attributes
    #ApplicationLabel: DropboxEx1
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
    #DebuggerForceFullDeployment: true
    #DebuggerForceStandardAssets: true
#End Region
#AdditionalRes: ..\resource
instead of putting the xml to Objects\res\xml (i read this in the tutorial. not sure as i dont use analytics) you place the xml in

yourprojectdir\resourcefolderFULL\xml\analytics.xml
respectively into
yourprojectdir\resourcefolderLITE\xml\analytics.xml

Please note that you dont need to put the files writeprotected when using "AdditionalRes"-command!
 
Last edited:

NeverGiveUp2

Member
Licensed User
Hi Manfred,

i have problem to unterstand the path ..\
I get a compiler problem ERROR: resource directory '..\xmllite' does not exist
I create a directory xmllite in the directory ..\objects.
So the path is now:
C:\Users\Roland\Documents\B4A Apps\be4drive\Objects\xmllite
and my command is:
B4X:
#Region  Project Attributes
   #ApplicationLabel: be4drive Lite
   #VersionCode: 5
   #VersionName: 1.04
   'SupportedOrientations possible values: unspecified, landscape or portrait.
   #SupportedOrientations: portrait
   #CanInstallToExternalStorage: True
#End Region
#AdditionalRes: ..\xmllite

#Region  Activity Attributes
   #FullScreen: False
   #IncludeTitle: False
#End Region
Thanks for your realy fast help.

Best regards to Düren

Roland
 

DonManfred

Expert
Licensed User
Put the folder lite into
C:\Users\Roland\Documents\B4A Apps\be4drive\
-> C:\Users\Roland\Documents\B4A Apps\be4drive\xmllite\
The command additionalres expects a RESOURCEFOLDER... usually there are more folders. for you this means

create a folder xml in C:\Users\Roland\Documents\B4A Apps\be4drive\xmllite\
-> C:\Users\Roland\Documents\B4A Apps\be4drive\xmllite\xml\

place the analytics.xml into this folder
-> C:\Users\Roland\Documents\B4A Apps\be4drive\xmllite\xml\analytics.xml

use this additionalres-command
B4X:
#AdditionalRes: ..\xmllite
 

NeverGiveUp2

Member
Licensed User
Hello Manfred,

thank you for your help.

My mistake is the space in my path.

This is bad:
C:\Users\Roland\Documents\B4A Apps\be4drive\Objects\xmllite

This is good:
C:\Users\Roland\Documents\B4AApps\be4drive\Objects\xmllite

Have a nice evening.

Best regards

Roland
 
Top