Android Question how to install StateManager

Discussion in 'Android Questions' started by Electrocutioner, Jun 16, 2015.

  1. Electrocutioner

    Electrocutioner Member Licensed User

    There is no JAR file or XML in the download.
    Thanks in advance.
     
  2. DonManfred

    DonManfred Expert Licensed User

    Right. It is the SOURCE...

    It is a CLASS Module file which you need to add to your project.
     
  3. Electrocutioner

    Electrocutioner Member Licensed User

    I have installed StateManager as a class Module.

    Now when I compile I receive an error on this line
    Public Sub RestoreState(Page As Page, PageName As String, ValidPeriodInMinutes As Int) As Boolean

    Error description: Unknown type: page
    Are you missing a library reference?

    I checked off RandomAccessFile and Reflection
     
    Last edited: Jun 17, 2015
  4. DonManfred

    DonManfred Expert Licensed User

    randomaccessfiles and reflection must be CHECKED
    the signature of the sub in original is

    Code:
    Sub RestoreState(Activity As Activity, ActivityName As String, ValidPeriodInMinutes As Int) As Boolean
     
    Electrocutioner likes this.
  5. Electrocutioner

    Electrocutioner Member Licensed User

    Don Im not sure what you are saying. Are you saying replace the code?
     
  6. DonManfred

    DonManfred Expert Licensed User

    at least i would try to replace the declarationline of the sub... yes.
     
  7. Electrocutioner

    Electrocutioner Member Licensed User

    Ok I cut out the code I don't need. The next error I receive is

    Error description: Unknown member: dirlibrary
    Occurred on line: 16
    If File.Exists(File.DirLibrary, SettingsFileName) Then
    Word: dirlibrary
     
  8. DonManfred

    DonManfred Expert Licensed User

    [​IMG] Type file[dot] and you will get a list of all methods. dirlibrary is none of them
     
    lemonisdead likes this.
  9. Electrocutioner

    Electrocutioner Member Licensed User

    if File.DirLibrary doesn't exist, what should I use instead? would DirDefaultExternal work?
     
  10. asales

    asales Active Member Licensed User

    What version of StateManager are you using?
    I am using the 1.11 version and I don't have this issues.
    And there is no "File.DirLibrary" in the 1.11 version.
     
  11. DonManfred

    DonManfred Expert Licensed User

    maybe he should tell us which B4A version he is using. And if it is B4A at all. Actually i´m not sure we are talking about B4A :)

    And i believe all Methods/Properties of FILE are part of the CORE library
     
  12. Electrocutioner

    Electrocutioner Member Licensed User

    Last edited: Jun 19, 2015
  13. asales

    asales Active Member Licensed User

    Last edited: Jun 20, 2015
Loading...