Coder Social home page Coder Social logo

alfred's Introduction

Alfred

Alfred is an Android personal chat assistant that performs various functions for you. To use Alfred, you need to switch your input method to the Alfred keyboard. After doing that, you can use Alfred in the following manner:

You: Alfred inform me ebola # Alfred finds you a NYTimes article about Ebola

You: Alfred: Here's your NYTimes article: (nytimes article)

Friend: Alfred weather me

Friend: Alfred:

Customizing Alfred

Adding features to Alfred is quite simple. Here's how to do it:

  1. Fork the Alfred repo
  2. Create a class that follows the following format:
package com.example.android.softkeyboard;

//Import statements here

public class <Classname> {

    private static final String API_KEY = <API_KEY>;

    public static String <Method_Name>(String query) {
		//Do what you want Alfred to do here
    }
}
  1. In Bot.java, add a case in the switch statement in the format:
        case "<command> me":
        	String command_result = <Classname>.<Method_name>(params)
        	String short_url = Bot.shortenURL(command_result);
        	response = !command_result.equals("") ? "Alfred: Here's what you requested: " + short_url : "Alfred: I can't find anything on that";
            break;
  1. That's it!

##Original Developers

  • Siddharth Ramakrishnan (siddharthvader)
  • Niger Little-Poole (nlittlepoole)
  • Brian Zeng (thebrianzeng)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.