Android Question how to create activity in libraries to use in the app

Discussion in 'Android Questions' started by Roberto P., Sep 16, 2015.

  1. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I created a small library to manage related activity in some form. I would like to make small functional modules in libraries for use in various app.


    I call these forms in an app (with startActivity) but the system generates this error:

    upload_2015-9-16_17-7-15.png

    Mistake or something you can not do this?
     
  2. DonManfred

    DonManfred Expert Licensed User

    The error Sounds like an B4J issue = WrongForum?
     
  3. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I confirm that it is a problem of B4A.
     
  4. DonManfred

    DonManfred Expert Licensed User

    and you are trying to start an b4j app?
     
  5. warwound

    warwound Expert Licensed User

    Have you created an Activity entry in your manifest for the Activity that's in your library?
    If not then that might explain the (Activity?) class not being found.

    The manifest syntax is:

    Code:
    AddApplicationText(<activity android:name="my.library.package.name.myclassname"/>)
     
  6. Roberto P.

    Roberto P. Well-Known Member Licensed User

    DonManfred you're right, there are other errors of another test I'm doing. I did another test and this is the result.

    upload_2015-9-17_7-50-37.png
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    You need to add frmmain.bal to your project.
     
  8. Roberto P.

    Roberto P. Well-Known Member Licensed User

    Hi Erel,
    this makes you lose the advantage of creating a standalone library.

    There is another way to create basic modules (items, customers, etc.) to use eg create complete functional modules to be reused in different parts?
    thanks
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Asset files must be added to the project. It is not possible to merge them in the jar file.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice