This summer, I worked on FOSSASIA's Open Event Android App Generator for generating a customized android app for any event and enhanced the already existing Android app by adding a schedule in it and various UI/UX enhancements.
The app-generator server is hosted on a VPS server and runs on ubuntu
It takes in the data entered by the user on the generator website and then using that data and our app's source code generates an app customized to their need and emails it to them.
User can either upload an API endpoint or a zip containing json files on the generator where the data to be displayed in the app will be fetched from
A test setup of our project can be accessed here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.TargetApi; | |
import android.app.PendingIntent; | |
import android.appwidget.AppWidgetManager; | |
import android.appwidget.AppWidgetProvider; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.Build; | |
import android.support.annotation.NonNull; | |
import android.widget.RemoteViews; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" | |
android:initialKeyguardLayout="@layout/app_widget" | |
android:initialLayout="@layout/app_widget" | |
android:minHeight="110dp" | |
android:minWidth="170dp" | |
android:previewImage="@drawable/example_appwidget_preview" | |
android:resizeMode="horizontal|vertical" | |
android:updatePeriodMillis="86400000" | |
android:widgetCategory="home_screen"></appwidget-provider> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function sendResponse($data) { | |
header('Content-type: application/json'); | |
echo json_encode($data); | |
die(); | |
} | |
/* If the request isn't a POST request then send an error message*/ | |
if ($_SERVER['REQUEST_METHOD'] != 'POST') { | |
sendResponse([ | |
"status"=>"error", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Apk Generator</title> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100' rel='stylesheet' type='text/css'> | |
<link href="css/main.css" rel="stylesheet"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['timestamp'])) | |
{ | |
$uid = escapeshellcmd($_POST['timestamp']); | |
exec("sudo sh /var/www/email.sh $uid"); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
mkdir $HOME/daily/ | |
cp -R /home/travis/build/fossasia/open-event-android/android/app/build/outputs/apk/app-fdroid-debug.apk $HOME/daily/ | |
# go to home and setup git | |
cd $HOME | |
git config --global user.email "harshithdwivedi@gmail.com" | |
git config --global user.name "the-dagger" | |
git clone --quiet --branch=development https://the-dagger:$GITHUB_API_KEY@github.com/fossasia/open-event-android development > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Your Name | |
email = you@youremail.com | |
[alias] | |
A = add -A | |
a = add | |
aa = add --all | |
ae = add --edit | |
ai = add --interactive | |
amend = commit --amend -C HEAD |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Open Source is increasingly making the news. With the many business and government bodies that now use open source offerings, it's becoming quite obvious that being free is not the only advantage Open Source Software provides. In this talk, I'll be taking you through the magical realm of the Land known as Open Source. What it is, what it is not and how can you be a part of it.
- Introduction to Open Source (5 mins):
I'll be talking briefly about what Open Source means and will be debunking common myths regarding Open Source.