Java Question IMPORTANT NOTICE about libraries license

bluedude

Well-Known Member
Licensed User
Longtime User
This licensing stuff should be more visible, I wasn't aware of it actually and now i'm wondering how to attribute all people/companies behind the libraries in my soon to release app. Do I need to make a long listview with all names in there?

In the cc 3.0 it talks about attribution in the manner specified by the author but this information isn't anywhere on the forum.

For me it is pretty simple, if I download a library and the library developer does not tell me about his attribution or licensing specifically I assume there is no licensing needed and he is fine with me using it.

So your post regarding licensing is a good one because I was unaware. For me it is the responsibility of the author to make very clear how licensing/attribution works. That is the professional way to do it.

Would help if you create a separate forum group. I would also be good if developers point to a license when they post a library.

I will start to ask all library developers what I need to do for the work they did.

Cheers,
 

bluedude

Well-Known Member
Licensed User
Longtime User
Hi Erel,

I never saw that in the libraries list is a CC notice. My apologies, it is clear!!
 

positrom2

Active Member
Licensed User
Longtime User
Licencing questions

Hi,
questions mainly to Erel:
1. Am I right with the assumption that apps developed with a licenced version of the bare Basic4Android can be distributed freely?
2. What if "official libraries" are used?

Remark: Using "libraries created by other members" seems to be dangerous even having asked the developers. Who knows if their statements are legally valid and won't be questioned later on?

Regards, positrom2
 

stevel05

Expert
Licensed User
Longtime User
Regarding using "libraries created by other members", the CC license states that the following condition is met:

Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

It seems that the onus is on the developer to specify any such requirements, and it would seem logical that for clarity, any such requirements should be specified in the original post in which the library is shared.

For my part the libraries I have created, although trivial in workload compared to some from other users, I have shared so that others can use them, and to add to the overall functionality of B4A.

While it would be nice to know if the libraries are useful, and are used in published applications, asking that the libraries are attributed in developed apps could lead to a long list for some apps, and some could easily be overlooked amongst the 'official' libraries.

Personally I would be happy for a message to be posted in the Library thread that says something like "Thanks for the library, I've used it in xyz app if you want to check it out".

If others do want attributions, you could do it on a splash page, or a separate menu option.

This is my take on it, and applicable to libraries I have generated.

Steve
 

stevel05

Expert
Licensed User
Longtime User
There is a further issue where the libraries wrap third party java or C/C++ libraries that may require attribution and even in some cases payment to the third party. I would see it as responsibility of the developer (of the app not the library) to ensure that these requirements are met.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Adding the proper credits

Hi,

What I have done is as follows:

- asked library developers if allowed;
- added a separate activity to my app.

See attached screen shots. The listview contains the name of the developer, the libraries used and a link to whatever the author wants.
 

Attachments

  • credits.png
    credits.png
    78.1 KB · Views: 983
  • credits_screen.jpg
    credits_screen.jpg
    79.2 KB · Views: 849

warwound

Expert
Licensed User
Longtime User
I had an idea - haven't implemented it yet though.

I thought i'd add a method to a library such as GetAttributionStrings().

It'd return a Map or List of Maps where each Map contains keys Title, PlainText and Html.

The Title value would be the name of a wrapped 3rd party library, the PlainText would be that library's license as plain text and Html would be the same license text formatted in HTML so it could be displayed in a WebView.

That would leave the library user to use that info as they wish.

Martin.
 
  • Like
Reactions: gma

warwound

Expert
Licensed User
Longtime User
How about this for a draft working solution we could all try to comply with...

First an AttributionObject class:

B4X:
package your.package.name;

import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.ShortName;

@Author("Joe Bloggs")
@ShortName("AttributionObject")
public class AttributionObject {
   private String mHtml;
   private String mLibraryName;
   private String mPlaintext;
   
   public AttributionObject(){
      //   default constructor
   }
   public AttributionObject(String[] pAttributionStrings){
      mHtml=pAttributionStrings[2];
      mLibraryName=pAttributionStrings[0];
      mPlaintext=pAttributionStrings[1];
   }

   /**
    * Get the licensing and attribution Strings as HTML.
    */
   public String getHtml(){
      return mHtml;
   }
   
   /**
    * Get the name of the 3rd party library that this AttributionObject refers to.
    */
   public String getLibraryName(){
      return mLibraryName;
   }
   
   /**
    * Get the licensing and attribution Strings as plain text.
    */
   public String getPlainText(){
      return mPlaintext;
   }
}

Next a new library method that returns an Array of AttributionObjects to B4A:

B4X:
/**
 * Returns an Array of AttributionObjects.
 *An AttributionObject contains licensing and attribution Strings relating to 3rd party libraries used in this B4A library.
 *You are required to display some or all of these Strings in your application if you use related B4A library object(s).
 */
public AttributionObject[] GetAttributionObjects() {
   Resources resources=BA.applicationContext.getResources();
   int resourceId;
   resourceId=resources.getIdentifier("attribution_object_names", "array", BA.packageName);
   String[] attributionObjectNames=resources.getStringArray(resourceId);
   String[] attributionValues;
   int attributionObjectsCount=attributionObjectNames.length;
   AttributionObject[] attributionObjects=new AttributionObject[attributionObjectsCount];
   
   for (int i = 0; i < attributionObjectsCount; i++) {
      resourceId=resources.getIdentifier(attributionObjectNames[i], "array", BA.packageName);
      attributionValues=resources.getStringArray(resourceId);
      attributionObjects[i]=new AttributionObject(attributionValues);
   }
   return attributionObjects;
}

Finally you can create and edit the attribution Strings in an XML file located Objects/res/values, the XML filename can be whatever you desire and must be made read-only:

B4X:
<?xml version="1.0" encoding="utf-8"?>
<resources>
   <string-array name="attribution_object_names">
      <item>osm_droid</item>
      <item>open_street_map</item>
      <item>markers_balloon_overlay</item>
   </string-array>
    <string-array name="osm_droid">
        <item>OSMDroid</item>
        <item>OSMDroid is licensed under the terms and conditions of the GNU Lesser General Public Licence.</item>
        <item><![CDATA[<a href="http://code.google.com/p/osmdroid/">OSMDroid</a> is licensed under the terms and conditions of the <a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public Licence</a>.]]></item>
    </string-array>
    <string-array name="open_street_map">
        <item>OpenStreetMap</item>
        <item>OSMDroid displays map data provided by the OpenStreetMap project. This map data is licensed under the terms and conditions of the Creative Commons Attribution 3.0 Unported Licence.</item>
        <item><![CDATA[OSMDroid displays map data provided by the <a href="http://www.openstreetmap.org/">OpenStreetMap</a> project.<br />This map data is licensed under the terms and conditions of the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution 3.0 Unported Licence</a>.]]></item>
    </string-array>
    <string-array name="markers_balloon_overlay">
        <item>MarkersBalloonOverlay</item>
        <item>MarkersBalloonOverlay is a modification of the Android MapViewBalloons project. MapViewBalloons is licensed under the terms and conditions of the Apache License, Version 2.0.</item>
        <item><![CDATA[MarkersBalloonOverlay is a modification of the Android <a href="https://github.com/jgilfelt/android-mapviewballoons">MapViewBalloons</a> project.<br />MapViewBalloons is licensed under the terms and conditions of the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.]]></item>
    </string-array>
</resources>

Note that HTML contained in an item element must be contained by a CDATA section:

B4X:
<item><![CDATA[  **HTML here**   ]]></item>

The GetAttributionObjects method references the first XML string-array element named attribution_object_names, which has items that name the other string-array elements that contain the actual attribution String values.

So attribution_object_names is the only hardcoded value, you can add/edit/remove AttributionObjects by editing the XML - no need to recompile your library and no need for your library to become bloated with lots of Strings.

And finally (i think) you can create locale specific variations of your XML file.
Create folder Objects/res/value-it and add an Italian version of your XML string-arrays for example.

What do you all think?

Sample B4A project, example libarary and Eclipse source attached.

Martin.
 

Attachments

  • AttributionObject.zip
    15.1 KB · Views: 557

ukimiku

Active Member
Licensed User
Longtime User
@bluedude:
If you publish a link in your app (to a location the developer of the library that you use/reference specified), you possibly should exclude any liability on your part for the material found at the linked-to location. In Germany, if you don't explicitly deny any responsibility for the contents found at external links, you may be held liable for the contents there.
 

frasier

Member
Licensed User
Longtime User
Unfortunately, for me it's still not clear when I have to add a attribution to my app. The additional libraries are licensed with the creative commons CC BY 3.0 license. The license says: I have to attribute the work in the manner specified by the author. Does it mean I have always to add the author and library name somewhere in my app even if the author has not specfied any attribution?
 

Informatix

Expert
Licensed User
Longtime User
Unfortunately, for me it's still not clear when I have to add a attribution to my app. The additional libraries are licensed with the creative commons CC BY 3.0 license. The license says: I have to attribute the work in the manner specified by the author. Does it mean I have always to add the author and library name somewhere in my app even if the author has not specfied any attribution?

Even if the author does not say anything special or not expressly request to be mentioned, it is courteous and friendly to name him in the credits screen of the application. Especially if the application couldn't exist without his contribution.
 

frasier

Member
Licensed User
Longtime User
Thank you for your reply. You're right I will add a credit activity to my app where I mention the author and library name.
 

frasier

Member
Licensed User
Longtime User
Hi,

it has been a long time since I developed in B4A. Now I am starting again and I am using some third party libraries in my app.
For me the license issue of third party libraries is still not really clear. My understanding is I must attribute every library author even if they did not specified it.

How excactly should I do this? As I mentoined above my plan was to add a credit screen in my app where I add those credits or is there another approach?

What exactly do I have to show on that screen? Is the name of the author and library enough? Should I add the license text as well?

I would be very glad if someone can make this more clear to me.

Regards,
 

frasier

Member
Licensed User
Longtime User
Hi Erel,

thank you for your quick response. What actually is not clear to me is:

Do I must add this credit screen to my app or is it on my choice when the library is licsensed under CC BY 3.0?

Regards,
 

frasier

Member
Licensed User
Longtime User
Thank you. This was also my understanding that a credit screen is always required when you are using non official libraries.

Does anyone have an app with such a credit screen? I would be very interested to see how it looks like.

Regards,
 
Top