豆瓣FM for Ubuntu Touch

@DawnDIY

  • Why
  • What
  • How

Why

Just because I like music

I like it, so I make it

What

  • Can play music
  • Can choose channel
  • Can tags like/unlike
  • Can share
  • Can play offline

So...

How

  • Golang
    • gopkg.in/qml.v1
    • github.com/bitly/go-simplejson
  • QML
  • SQLite
    • QtQuick.LocalStorage
package main

import (
   "gopkg.in/qml.v1"
)

func main() {
	log.Println("Start")
	err := qml.Run(run)
	log.Println(err)
}

func run() error {
	engine := qml.NewEngine()

	context := engine.Context()

	// set custom data from go to qml
	context.SetVar("song", GetSong())

	component, err := engine.LoadFile("douban-fm.qml")
	if err != nil {
		return err
	}
	win := component.CreateWindow(nil)
	win.Show()
	win.Wait()
	return nil
}

Golang Style

Using Golang

  • qml-app

QML support for the Go language

    https://github.com/go-qml/qml

Ubuntu-Go-template

​    https://github.com/dawndiy/ubuntu-go-qml-template

 

  • ubuntu-scope

https://launchpad.net/go-unityscopes

使用golang来设计我们的Ubuntu Scope

http://blog.csdn.net/ubuntutouch/article/details/46724739

 

One more thing...

Douban-FM for Ubuntu Touch

By dawndiy

Douban-FM for Ubuntu Touch

Douban-FM for Ubuntu Touch By DawnDIY @ UbuntuHackathon

  • 982
Loading comments...

More from dawndiy