2

Let us say I create a recycler view for MyFeedItem using snippets from this codelab

I copy snippets from the mentioned codelab to create below file first

class SleepNightDiffCallback : DiffUtil.ItemCallback<SleepNight>() {

override fun areItemsTheSame(oldItem: SleepNight, newItem: SleepNight): Boolean {
          return oldItem.nightId == newItem.nightId
    }

    override fun areContentsTheSame(oldItem: SleepNight, newItem: SleepNight): Boolean {
         return oldItem == newItem
    }
}

and just replace SleepNight with MyFeedItem and nightId with id to generate "my" software below

class MyFeedItemDiffCallback : DiffUtil.ItemCallback<MyFeedItem>() {

override fun areItemsTheSame(oldItem: MyFeedItem, newItem: MyFeedItem): Boolean {
         return oldItem.id == newItem.id
    }

    override fun areContentsTheSame(oldItem: MyFeedItem, newItem: MyFeedItem): Boolean {
        return oldItem == newItem
    }
}

For brevity, let us assume that this is the only file in the software produced and I am selling this software commercially.

  • Am I under some copyright violations here? (given no license info is mentioned on the website)
  • If yes, what is the remedy
  • For the same scenario, let us say that the snippet is under MIT license and I have produced the same single file software that I am selling commercially and keeping it closed source. Are there any copyright violations, if yes, then what is the remedy and can I keep it closed source.
1

Am I under some copyright violations here? (given no license info is mentioned on the website)

If there truly is no license given, then you have indeed violated the copyrights on the code because you need a license to make copies and/or changes.

However, the overview page for the cource does have a link to a page with licensing information (https://developer.android.com/license) and that page states

Unless otherwise noted, the documentation on this site, including any code shown in it, is made available to you under the Apache 2.0 license

The Apache 2.0 license is a permissive license that allows you to keep your modified version closed source, but you must inform the recipients of the app that parts of it are under the Apache 2.0 license and give them a copy of the license.

1
  • Thanks, found Terms at lower left corner of the codelabs homepage. The Terms page contains the Apache 2.0 info at the footer. Also found chrome://credits as a good example on how to provide license info in some section of your software – Abhinav Atul Oct 29 '20 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.