Publish an Open Source app on Fdroid

Fdroid is a famous software repository hosted with numerous free and open source Android apps. They have a main repository where they allow developers hosting free and ad free software after a thorough check up on the app. This blog will tell you how to get your project hosted in their repository using steps I followed to publish the PSLab Android app.

Before you get started, make sure you have the consent from your developer community to publish their app on Fdroid. Fdroid requires your app to use all kind of open resources to implement features. If there is any closed source libraries in your app and you still want to publish it on Fdroid, you may have to reimplement that feature by any other mean without using closed source resources. They will also not allow to have Google’s proprietary “play-services” in your app along with proprietary ad services. You can find the complete inclusion policy document from their official page.

When your app is fully ready, you can get started with the inclusion procedure. Unlike how we are publishing apps on Google Play, publishing an app on Fdroid is as simple as sending a pull request to their main repository. That’s exactly what we have to do. In simple terms all we have to do is:

  1. Fork the Fdroid main data repository
  2. Make changes to their files to include our app
  3. Do a pull request

First of all you need a GitLab account as the Fdroid repository is hosted in GitLab. Once you are ready with a GitLab account, fork and clone the f-droid-data repository. The next step is to install the fdroid-server. This can be simply done using apt:

$ sudo apt install fdroidserver

Once that is done, go into the directory where you cloned the repository and run the following command to read current meta data where it saves all the information related to existing apps on Fdroid;

$ fdroid readmeta

This will list out various details about the current meta files. Next step is to add our app details into this meta file. This can be done easily using following command or you can manually create folders and files. But the following is safer;

$ fdroid import --url https://github.com/fossasia/pslab-android --subdir app

Replace the link to repository from the –url tag in the above command. For instance the following will be the link for fossasia-phimpme android;

$ fdroid import --url https://github.com/fossasia/phimpme-android --subdir app

This will create a file named as “org.fossasia.pslab” in the metadata directory. Open up this text file and we have to fill in our details.

  1. Categories
  2. License
  3. Web Site
  4. Summary
  5. Description

Description needs to be terminated with a newline and a dot to avoid build failures.

Once the file is filled up, run the following command to make sure that the metadata file is complete.

$ fdroid readmeta

Then run the following command to clean up the file

$ fdroid rewritemeta org.fossasia.pslab

We can automatically add version details using the following command:

$ fdroid checkupdates org.fossasia.pslab

Now run the lint test to see if the app is building correctly.

$ fdroid lint org.fossasia.pslab

If there are any errors thrown, fix them to get to the next step where we actually build the app:

$ fdroid build -v -l org.fossasia.pslab

Now you are ready to make the pull request which will then get reviewed by developers in Fdroid community to get it merged into their main branch. Make a commit and then push to your fork. From there it is pretty straightforward to make a pull request to the main repository. Once that is done, they will test the app for any insecurities. If all of them are passed, the app will be available in Fdroid!

Reference:

  1. Quick Start: https://gitlab.com/fdroid/fdroiddata/blob/master/README.md#quickstart
  2. Making merge requests: https://gitlab.com/fdroid/fdroiddata/blob/master/CONTRIBUTING.md#merge-requests
Continue ReadingPublish an Open Source app on Fdroid
Read more about the article Daimler: Our developers know about the advantages of Open Source Software
Mit fünf spektakulären Installationen hat Sarah Illenberger den Mercedes-Benz F015 Luxury in Motion in Szene gesetzt. Die renommierte Künstlerin arbeitete dabei im Spannungsfeld zwischen technologischer Zukunft und künstlerischer Handarbeit. Mit den Installationen übersetzte Illenberger die faszinierenden Eigenschaften des F015 in eine ausdrucksstarke Bildwelt, die dem Betrachter die Mercedes-Benz Vision vom autonomen Fahren näherbringt. Die Motive machen den Sprung in die neue Ära des Fahrens und die damit verbundenen Veränderungen begreifbar. Dabei wird automobile Ingenieurs- und Designleistung im besten Sinne zu Kunst. ; Sarah Illenberger has drawn attention to the Mercedes-Benz F015 Luxury in Motion by producing five spectacular installations. To do this, the renowned artist had to work between the poles of technological future and artistic handiwork. With these installations, Illenberger has translated the fascinating features of the F015 into an expressive pictorial world that brings the observer closer to the Mercedes-Benz vision of autonomous driving. The subjects take the leap into the new era of driving, rendering the associated changes touchable and comprehensible. This process sees automotive engineering and design achievements becoming art in the best sense of the word.;

Daimler: Our developers know about the advantages of Open Source Software

Vlado Koljibabic is Head of CASE IT at Daimler AG, the parent company of the car manufacturer Mercedes-Benz. He aims to strengthen the idea of Open Source in his company. Daimler is a partner of FOSSASIA. Torben Stephan interviewed Koljibabic on the advantages of open source software.

Stephan: What does CASE stand for?

Koljibabic: CASE is the combination of everything disruptive regarding our business: Connected, Autonomous, Shared & Services and Electric. These topics shall help us to transform from a car manufacturer to a mobility services provider. This is key in order to remain successful in the future.

How much Free and Open Source Software (FOSS) is actually part of a Mercedes?

We have been using FOSS for many years. Any Mercedes-Benz comes with a CD full of FOSS licenses. Every license belongs to a piece of open source software which is implemented in our cars. Even our Mercedes me app contains seven OS licenses. We use it because our developers know about the advantages of OSS.

Which are?

We don’t need to develop everything from scratch, we can reuse things where it makes sense and contribute to the development of open standards that increase efficiency throughout the system.

Daimler is a member of the “Automotive Grade Linux” (AGL) initiative initiated by the Linux Foundation. Isn’t that the right place for such open standards?

Absolutely. During FOSSASIA, with the community, we discussed the opportunity of defining an open standard for electric vehicle charging stations. From my point of view it definitely does make sense to develop this via the AGL. On the other hand Daimler might put even more commitment into this project to show we seriously want to be part of this.

Vlado Koljibabic CASE IT Daimler
Vlado Koljibabic CASE IT Daimler

 

What’s the advantage of open source software compared to proprietary?

Two things: Nobel Prize laureate John Nash showed that sharing of commodities brings advantages to all players in the market. For me this is the secret of the success of open source software. Beside this we can use existing software solutions for recurring processes. And the car industry is full of recurring processes. If there is no ready-to-use solution, we can initiate and design the processes and contribute to the community.

How do other business units within Daimler respond to this ideas?

For a company like Daimler these are huge changes. That’s why we do this step-by-step. First of all we convince our internal stakeholders of the reasonableness and the value of FOSS. As a following step we accelerate the topic within concrete projects. The overall process of enhancement of OSS usage is initiated and strategically supported. Jan Brecht the CIO of the Daimler AG drives and promotes the initiative essentially.

In which fields would you refrain from publishing your source code?

For example in highly sensitive areas in terms of competition. One example is Autonomous Driving – I would not be the first to focus on open source when it comes to this topic right now. But I’m sure that within the next years, there will be a deck of open source tools for Autonomous Driving, Machine Learning and Artificial Intelligence everyone can use.

Daimler uses a lot of open source. But what are you giving back to the community?

We are a member of the Linux Foundation and partner here at FOSSASIA. However, we don’t contribute source code yet in the context of open source projects. But we see the demand of the community and are working on it continuously to contribute as soon as possible.

Continue ReadingDaimler: Our developers know about the advantages of Open Source Software

UNESCO Hackathon at FOSSASIA Summit in Singapore

Join the UNESCO Open Data Hackathon at the FOSSASIA Summit, create open source apps and games that tackle climate change, environment and sustainable development challenges, and win awesome prizes! The hackathon takes place from Saturday 24 March to Sunday 25 March 2018 at the Lifelong Learning Institute in Singapore.

We are specifically interested in applications and games that set an example for others who could replicate solutions in other countries, and in particular in the Mekong countries, to tackle the sustainable development challenges. It is our goal to engage the developer community to develop innovative applications in open source by leveraging the open data and knowledge available.

We are inviting developers, designers, open source contributors, bloggers, journalists and all FOSSASIA community members to be part of the UNESCO Hackathon. We are especially encouraging applications from the Mekong region to join the contest. The hackathon is open for all and awesome prizes are waiting for you!

For participants from outside of Singapore we have the possibility to host them in a Singapore hostel. Please apply here. The number is limited. UNESCO encourages the application of women and girls.

How do I sign up?

1. Get your ticket to the Event on eventyay.com.

2. Sign up on Devpost.

3. Join the Gitter channel at https://gitter.im/fossasia/hackathon (requires login with Github).

4. Find team members and create your team preferably at least 3 members and maximum 5 contributors. You are also welcome to sign up and then wait until the Presentation of Ideas on Saturday before deciding to join a team, however we’d encourage you to form/join a team in advance if you already have an idea that you’d like to work on.

5. Join the event at the Lifelong Learning Institute on Saturday, March 24 at the opening at 2.00 pm until 10.00 pm and on Sunday, March 25 from 9.00 am until 5.00 pm.

Visit the website at unesco.sciencehack.asia and stay connected, join the event on Facebook and Meetup and follow FOSSASIA on Twitter.

UNESCO Hackathon Schedule

Hackathon Opening: March 24, 2018

12.00 Registration Opens
14:00 Opening
14.10 Intro of Background, Rules and Prizes
14:20 Presentation of Ideas, Teams and Team Building Activities
15:00 Begin of Hacking Activities
19.30 Dinner
22:00 Closing of Space

Hackday: March 25, 2018

08:00 – 09:00 Breakfast
09:00 – 13:00 Hack Activities Continue
13:00 – 13:30 Lunch
13:30 – 15:00 Hacking Continues
14:00 Submission Form Closes
15:15 – 16:00 Presentation of Outcome
16:00 Judges Withdraw for Consultation
16:30 Award Announcement and Ceremony
17:00 Summit Closing

Location/Venue

Lifelong Learning Institute

Address: 11 Eunos Road 8, Singapore 408601

Prizes

Prizes are awarded for three teams, and each team prize with a value of 1000 SGD. Win cool gear, hardware, raspis, Arduinos and more!

Project Submission Requirements

For the expected outcome of the hack, the applications or games shall be open source and use open data to tackle the climate change, environment and sustainable development challenges.

They shall address one or several of the following requirements:

  1. Respond to pressing environmental challenges at local, national or regional levels in Asia

  2. Enable the visualization of data in an innovative and/or easy-to-understand way

  3. Mobilize and create engagement of variety of stakeholders and sectors in society on climate change, environment and sustainable development

  4. Gender-sensitive prototype, recognizing or encouraging women’s participation in sustainable development

Functioning App

An important point is, is the prototype or showcase functioning? We prefer real code and design implementations over mockups.

What to enter

Please submit a link to the app, a Github repo link and a short presentation as a download or on Google drive (ensure it is set to public sharing). You can also share anything else to demonstrate your work and let us test it.

  • Video: The platform accepts links to YouTube, Vimeo or Youku. If you like you can post a short video to demonstrate your work.

  • File Upload: There is also an option to upload a file. The platform allows submitters to upload one file, though they can combine files into a single ZIP file.

  • Other: The platform requires contestants to enter an entry name and description. Please also accept the the conditions of the contest including sharing your work under certified Open Source license.

Platform

Share information about what operating systems or devices can your hack run on.

Ressources

Include information about API, SDK, or data set, that are required to run the app.

New vs. Existing

Any work done need to be new for the competition. Existing apps are not eligible. However the specific details what is acceptable and what is not will be determined by the jury. For example existing apps that have been modified substantially and include entirely new functionality would still be eligible.

Submission Rights & Display

The submissions should be Open Source and licensed under a compliant Open Source/Free Software license. They should be upload to a Github repository.

We also request the right to use the winners’ names and work to promote the competition and hackathons in future.

Links

UNESCO Hackathon: https://unesco.sciencehack.asia

FOSSASIA Summit: https://2018.fossasia.org

Tickets: https://eventyay.com/e/db15e7db/

Project Signup: https://fossasia-unesco.devpost.com

Facebook: https://www.facebook.com/events/139329623548116/

Meetup: https://www.meetup.com/FOSSASIA-Singapore-Open-Technology-Meetup/events/247899257/

FOSSASIA: https://twitter.com/fossasia

List of Open Data Resources in Asia

Data portals across Asia: http://dataportals.org
China: http://opendatachina.com
Singapore http://data.gov.sg
Indonesia: https://petabencana.id/map/jakarta
Cambodia: https://opendevelopmentcambodia.net
Thailand https://data.go.th, http://catalog.opendata.in.th
Vietnam: https://vietnam.opendevelopmentmekong.net/data/
World Bank: https://data.worldbank.org
India http://data.gov.in

Continue ReadingUNESCO Hackathon at FOSSASIA Summit in Singapore

Join Codeheat Coding Contest 2016/17

In the Heat of the Code is a coding contest supported by the UNESCO to involve new contributors in Open Source projects. Participating projects are:

1. The Open Event Orga Server using Python/flask.
2. The SUSI.AI repositories with a focus on the SUSI.AI Android App and SUSI Messenger Bots, and
3. The loklak repositories with a focus on loklak search with AngularJS.

The contest runs until 3rd February 2017. Grand prize winners will be invited to present their work at the FOSSASIA Summit at the Science Centre Singapore from March 17th -19th 2017 and will get up to 450 USD in travel funding to attend, plus a free speaker ticket.

codeheat-logo

Our jury will choose three winners from the top 10 contributors according to code quality and relevance of commits for the project. The jury also takes other contributions like submitted scrum reports and technical blog posts into account, but of course awesome code is the most important item on the list. Other participants will have the chance to win vouchers to attend Open Tech events in the region and will get certificates of participation. Sign up here now.

A team of over 30 mentors and jury members from 10 different countries supports participants of the contest.

Participants should take the time to read through the contest FAQ and familiarize themselves with the introductory information and Readme.md of each project before starting work on an issue.

The website codeheat.org has a list of questions and answers. Developers interested in the contest can also contact mentors on our Slack channel [Get a Slack Invite].

If you make at least four commits labeled “hacktoberfest” before 31st October you can also win a Hacktoberfest T-shirt (additional sign up required here).

Continue ReadingJoin Codeheat Coding Contest 2016/17

GET and POST requests

If you wonder how to get or update page resource, you have to read this article.

It’s trivial if you have basic knowledge about HTTP protocol. I’d like to get you little involved to this subject.

So GET and POST are most useful methods in HTTP protocol.

What is HTTP?

Hypertext transfer protocol – allow us to communicate between client and server side. In Open Event project we use web browser as client and for now we use Heroku for server side.

Difference between GET and POST methods

GET – it allows to get data from specified resources

POST – it allows to submit new data to specified resources for example by html form.

GET samples:

For example we use it to get details about event

curl http://open-event-dev.herokuapp.com/api/v2/events/95

Response from server:

Of course you can use this for another needs, If you are a poker player I suppose that you’d like to know how many percentage you have on hand.

curl http://www.propokertools.com/simulations/show?g=he&s=generic&b&d&h1=AA&h2=KK&h3&h4&h5&h6&_

POST samples:

curl -X POST https://example.com/resource.cgi

You can often find this action in a contact page or in a login page.

How does request look in python?

We use Requests library to communication between client and server side. It’s very readable for developers. You can find great documentation  and a lot of code samples on their website. It’s very important to see how it works.

>>> r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
>>> r.status_code
200

I know that samples are very important, but take a look how Requests library fulfils our requirements in 100%. We have decided to use it because we would like to communicate between android app generator and orga server application. We have needed to send request with params(email, app_name, and api of event url) by post method to android generator resource. It executes the process of sending an email – a package of android application to a provided email address.

data = {
    "email": login.current_user.email,
    "app_name": self.app_name,
    "endpoint": request.url_root + "api/v2/events/" + str(self.event.id)
}
r = requests.post(self.app_link, json=data)

 

Continue ReadingGET and POST requests