Canonical Voices

Posts tagged with 'mobile'

Victor Palau

I am pleased to announced that Logviewer is now published in the Ubuntu Touch store.  The app no longer runs unconfined but uses “read_path” pointing to “/var/log/” and “/home/phablet/.cache/”. If you think there is another interested log path let me know and I will try to include it.

Also, one feature that landed by popular request is submitting a selected section of a log to pastebin , thanks to Popey for the image:

pastebin


Read more
Victor Palau

[Ubuntu Touch] Logviewer

I have been recently doing some android development for Techfunder, one thing that I have found really useful when testing my app is using CatLog. CatLog allows you to check the app and system logs on the go. This is extremely useful when you have a crash while you are not close to your laptop.

This motivated me to look into writing a similar app for Ubuntu Touch. So here it is: LogViewer!

logslogsettingsunitylog

This app, like CatLog, is for developers and requires unconstrained running. You will need to install it manually:

  • Download click package from launchpad
  • transfer to your device and install:
  1. adb push com.ubuntu.developer.vtuson.logviewer_0.1_armhf.click /home/phablet/
  2. adb shell

  3. su phablet
  4. cd ~
  5. pkcon -p install-local com.ubuntu.developer.vtuson.logviewer_0.2_armhf.click

When you launch the app, you will get a list of .log files in /home/phablet/.cache/upstart/ , if you click on an specific log, it will be displayed in a similar manner to tail -f. You can pause the autoreading, clear the screen and copy to clipboard parts of the logs from the bottom menu.

You can also access other files, change font size of the logs and the size of the text buffered from the settings page.

You can see the code and contribute :) in launchpad:

https://launchpad.net/logviewer


Read more
Victor Palau

We announced today a new solution to dual boot Android and Ubuntu on the same device. Over the last few weeks I have recently blogged about a Contacts import app for Ubuntu and  Techfunder, an Android app for crowd funding projects. What I didn’t mention before is that I have been developing and testing both in the same device!

I have been dog-fooding and developing a small part of our dual boot solution for a couple weeks now.  During that time, I’ve not only been able to boot between Android and Ubuntu as a user, but also as an application developer.

Dual boot brings no compromise to the SDK experience of either operating system.  I run Ubuntu SDK with QTCreator and Android’s ADT (eclipse-based) on my 12.04 LTS laptop.  And while the SDK for Android is more mature and fully featured, I still find Ubuntu (an particularly QML) much faster to prototype apps.

Dual boot is also about making the application developers life easier and cheaper.  Having to buy extra devices for testing new apps can be a put you off. You can now develop for Ubuntu by jusr re-using your Android device.. without having to disrupt your android projects!  For example,  yesterday I was working on applications on both sides, and I was easily booting back and forward and collecting logs in each side.

I hope to see more integration in between both development environments, I think it will be particularly neat to have something like  Android Monitor tool (aka DDMS) working for both OSs.

Btw, I have just released version 2.0 of Techfunder! Including home screen widgets, search and more categories. Don’t forget to check it out:

Get it on Google Play


Read more
Victor Palau

I have a lot of contacts in my phone… I am sure you will have more, but syncing over 500 contacts to Ubuntu phone using the command line for Syncevolution gets tedious.

So I wrote a little QML app to do the trick for you. Unfortunately, to run a system command the application has to run unconfined, so I have not yet submitted it to the store.

But if you want to install it yourself it is pretty simple:

  1. Download this file
  2. push the downloaded file to your phone, like so: adb push com.ubuntu.developer.vtuson.contactsimporter_0.9_armhf.click /home/phablet
  3. then run this to install it: adb shell “sudo -u phablet pkcon -p install-local  /home/phablet/com.ubuntu.developer.vtuson.contactsimporter_0.9_armhf.click”

You should be good to use it now, the app looks like this: (and if you want to check out the code is here)

contactsimp


Read more
Victor Palau

Hi,

I found myself trying to build a QML Ubuntu Touch app project that includes a qml c++ extension and I found that I some how stumble a bit along the way. So, here are some of my notes on how I got it done. Hope that helps.

Creating the project.

Using QtCreator, create a new project and select – QML Extension Library + Tabbed Touch.  I found that it was easier to change the QML side of things than start with an extension and then add the whole project structure.

Build and Run your project locally

In QtCreator click on projects.  In Build, I set up the build path as my project root path. In run,  the executable is “/usr/bin/qmlscene” (make sure there is no spaces trailing) and then Arguments is set to “-I  ../backend/modules $@ yourapp.qml”, with a working directory of “projectroot/app”

Now if you try to run your project it should build it locally and run your app. After that you are on a roll.

Build on target device

Click Ctrl+f11 should install the platform developer tools in your device. However, I how found that this lately does not work.

Instead from the terminal:

first we will need to make the image in your device writeable:
adb shell touch /userdata/.writable_image  --> and reboot the phone.
then:
cd /usr/share/qtcreator/ubuntu/scripts
adb devices
./device_developertools_install <device_id>

Now you are ready to build, so back to QtCreator:

Build>Ubuntu>Build Application on Device

This should build the application with only some test problems, but the main binaries would be created. To package your app you will need to get

/home/phablet/dev_tmp/<yourapp>/backend/modules/lib<yourlib>.so

Creating a click package

create a manifest standard manifest file. Manifest.json

{
"description": "your text",
"framework": "ubuntu-sdk-13.10",
"hooks": {
"yourappname": {
"apparmor": "yourappname.json",
"desktop": "yourappname.desktop"
}
},
"maintainer": "your name<yourname@yourmail.com>",
"name": "com.ubuntu.developer.yourname.yourappname",
"title": "yourappname",
"version": "0.1",
"architecture": "armhf"
}

You will also need a yourapp.desktop file:

[Desktop Entry]
Name=yourappname
Comment=description
Exec=qmlscene -I plugin $@ yourapp.qml
Icon=icon.png
Terminal=false
Type=Application
X-Ubuntu-Touch=true

Note that Exec= has a -I plugin part to it. This is very important, will see later.

Now yourapp.json file that contains your confinement profile:

{
"policy_groups": [
"networking"
],
"policy_version": 1
}

Now time to setup a folder with all this stuff, not that the plugin folder is going to contain your lib which your are importing with -I option on the desktop file:
myproject>
-./click/
--icon.png
--manifest.json
--yourapp.json
--yourapp.desktop
--./plugin/
---./yourlib/
----lib(yourlibname).so
----qmldir

Now you are ready to build from your project root folder:
click build ./click

This should create a .click file in your project folder.

Installing in your device

adb pull your.click /home/phablet/
adb shell
su phablet
cd ~
pkcon -p install-local your.click

This should be enough, but sometimes I find that you need to restart unity:
pkill unity8 (you might need sudo)


Read more
Victor Palau

Since I lead the Ubuntu Edge campaign, I have been trying to keep up with other crowd funding projects.  I am mainly interested on technology and gadgets, and I have found it hard to navigate Kickstarter, but also to have to keep hoping between Kickstarter and Indiegogo to see what is going on.  Specially since now, seems like interesting projects are evently split between them.  You might share my friction on this… so I give you Techfunder:

Get it on Google Play

Techfunder is an Android app that provides an easy way to browse crowd funding projects launched across the main industry websites. Techfunder gathers Technology and Design projects from Kickstarter and Indiegogo.

Using Techfunder side navigation you can easily switch between:

  •  Popular
  •  New this week
  •  Staff Picks
  •  Design – Popular

Then you can browse as many projects on a compact scrollable list. Just click on the project you are interested to expand into a full screen view.From there you can tell the world about it using the share button. 

If you want to contribute or found out more about it, click on the “browse” button and Techfunder will launch the project page in your web browser. When you are finished, just press the Android back button to return to Techfunder.

I am currently planning to add a favourites/watchlist functionality and looking into a way to select additional crowd sourcing platform. I hope you enjoy it!


Read more
Victor Palau

Since I lead the Ubuntu Edge campaign, I have been trying to keep up with other crowd funding projects.  I am mainly interested on technology and gadgets, and I have found it hard to navigate Kickstarter, but also to have to keep hoping between Kickstarter and Indiegogo to see what is going on.  Specially since now, seems like interesting projects are evently split between them.  You might share my friction on this… so I give you Techfunder:

Get it on Google Play

Techfunder is an Android app that provides an easy way to browse crowd funding projects launched across the main industry websites. Techfunder gathers Technology and Design projects from Kickstarter and Indiegogo.

Using Techfunder side navigation you can easily switch between:

  •  Popular
  •  New this week
  •  Staff Picks
  •  Design – Popular

Then you can browse as many projects on a compact scrollable list. Just click on the project you are interested to expand into a full screen view.From there you can tell the world about it using the share button. 

If you want to contribute or found out more about it, click on the “browse” button and Techfunder will launch the project page in your web browser. When you are finished, just press the Android back button to return to Techfunder.

I am currently planning to add a favourites/watchlist functionality and looking into a way to select additional crowd sourcing platform. I hope you enjoy it!


Read more
Victor Palau

It has been over 2 months since the Ubuntu Edge campaign concluded, and I haven’t really blogged about it.  I must say, driving something like this was great fun but also a fully immersive 24-7 experience. For that reason, I wanted some time to pass before write some conclusions about it.

One of the things that made the Ubuntu Edge campaign to stand out from previous crowd funding projects was the target: $32 Million. Other successful projects (I will focus only on products) had much lower targets (~$100K). So, why was this the case?

If your company has already raised capital via “standard” funding routes or you are actively pursuing it, a successful crowd funding campaign will reduce the overall amount of equity you have to give away. It can also attract that elusive VC investment.  In this situation, your objectives are:

  • Proof the product viability 
  • Remove doubts from future investors minds
  • ensure your campaign and your product are perceived as a successes

An early achievement of your campaign target will tick all these boxes. A “sold out” effect in the first week will increase the confidence of future pledgers and investors. In that case, a campaign target of $100K can be the magic number for you. 

In the other hand, if crowd funding is your only or main avenue to finance your product, your objectives will be slightly different. These were ours:

  • Proof the product viability
  • Finance product design and factory tooling
  • Finance a fix/minimum production run
  • Market validation

An early achievement of your target is still desirable, but your main worry will be to raise enough money via the campaign to deliver on your promises to the pledgers.

Although we raised over $12 Million, we did not reach our intended target. The Ubuntu Edge was a unique proposition that was build on the premise of delivering the latest cutting edge technology.  Unfortunately, this meant that we could not pursue what I think is a better approach for 100% crowd funded products: a multi-campaign project.

In a crowd funding campaign, people contribute for different reasons:

  • The Angels: Angels are interested in supporting new innovation. They might not even necessarily want to own your product, but they appreciate the disruption you are trying to bring to the market.  For these reason, they are willing to contributed from a little as $1 to thousands of dollars to see your project succeed.
  • The Extended Team: These are passionate individuals that understand your product concept and they want one! Not only they are willing to part with some money to get one, but they are also willing to contribute their own time and energy to make your product successful. They are a great source of professional and amateur resources. The contributions we got for Ubuntu Edge ranged from advise on how to run the campaign by serious knowledge people, to PR (T-shirt designs, websites, ads) to product design.
  • The Pragmatists:  Your product might look good, but your project might just be too risky. Crowd funding projects are developing a bit of a reputation for shipping late or even worst, never happening.  Pragmatist might be put off from contributing to your project is the perceived risk is too high.  Some key questions they would like answer to are: Who are you? What is your proven record? Do you have a proto-type working?  Do you have suppliers ready to go? but they all ultimately boil down to one: Can I trust you?
  • The Shoppers: Although, it should be clear to everyone that crowd funding is not the same that shopping in Amazon, similar motivations may apply.  Shoppers will compare backing your project with buying a similar product online. Things they will care about: Are you offering a good deal? How long will it take for me get the product? What warranties do you offer?.

Pragmatists and shoppers form the bulk of the backer community out in the wild. If you are just getting started with your product development, you might find that addressing the concerns of pragmatists and shoppers is just not possible. In that case, financing your product development via multiple crowd funding projects might be a better option.

Target your first project to attract angels and extended-team. Set a campaign target that will allow you to build a prototype and start seriously talking to suppliers. Build up your credibility by delivering the first project on time.

For your second project, you will have had reduced the risk and the time to product delivery substantially. You might now be able to raise the rest of the funding or your might need a couple more iterations. Here is how the people at +Pool are doing it:

  1. First project
  2. second project

 

+POOL

 


Read more
Victor Palau

Hi everyone, I’ve been talking to a lot of you in the comments on the Indiegogo page, so I thought I’d come on here with a little video of my own computing setup.

I’m going to show you convergence. Although the hardware is getting a lot of the attention, it’s the Ubuntu Edge’s ability to be your phone and your PC that will have the biggest impact. How do I know this for sure? Because I’m already experiencing it.

For over two months I’ve been running Ubuntu for Android on a Nexus 4 phone, and even with its much slower processor and smaller storage than the Edge will have, it’s still made my working life so much simpler. With just a phone I can do pretty much anything that I could do before on my laptop.

I’ve made a quick video to show you a few examples. Remember this code is still in beta – with the final production code and the much more powerful hardware of the Ubuntu Edge, the desktop will really fly.

If you can’t see the video - click here

We’re doing great so far but there’s a long way to go, so please keep on sharing our campaign with everyone you know. You’re our best chance of making this happen!


Read more
Victor Palau

I was thinking about starting dogfooding Ubuntu Touch, and really for me the blocker is having a torch app! :) so here it is:

https://code.launchpad.net/~vtuson/+junk/torchapp

Tap in the lightbulb to turn the tourch on (tested on Galaxy Nexus). Image by  Ryan Hyde

 


torchontorchoff


Read more
Victor Palau

So a few months later, the game I was working on has now got to Beta stage. Since last time, I have added a few extra things:

  • Proper dogfight with a T50 fighter
  • Plane shadows
  • Scaling for multiple size screens
  • Revamp and multitouch controls
  • Collisions and explosions
  • Full keyboard control
  • Added 13 levels, loaded from level.txt JSON file
  • Tutorial walkthrough
  • and lots of bug fixes

Still only a Beta, but all the game play is now completed, now it is just fixing bugs ;) All the code is here, and some screen shots.

https://code.launchpad.net/~vtuson/+junk/dogfight

screenshot2
screenshot3
screnshoot1


Read more
Victor Palau

Since my first steps into QML when the Ubuntu SDK was launched, I have become a bit addicted to it. I decided to try to write a QML declarative game, and I settle on a shooting fighter jet game. Finally had enough content to put out an alpha. Here is the video:


The code for it in on my LP Junk branches, not really ready for review yet ;) but happy to have help!

You might notice that I am using the keyboard to drive the game in my computer, I have also build a touch joystick that so far works ok in the Nexus 7, but needs some calibration.

PS: if you have some problems with playing the video, try jumping a head 10 secs, it also helps if you play it in HD :)


Read more
Victor Palau

Last week I wrote about my first impressions on working with QML vs Android as I tried to translate a SimpleTodo application.

This week, I managed to find a few more spare hours to finish it. Not only that, but I have been able to go beyond what I had for Android. Specially on the UI part, QML makes it really simple to build in transitions and animations. I also found that defining States for the application had simplified the complexity of the program.

I don’t think that today there are official menus published for Ubuntu qml components, so I have implemented my own menu “a la” Ubuntu for phones. Here is a small video of the app:

or you can access the link here: http://www.youtube.com/watch?v=T-gDv-vDMhg

Overall, I highly recommend everyone to play with QML. Here are two very useful links if you are new to it:

And of course, lets not forget the awesome developer.ubuntu.com pages!


Read more
Victor Palau

A few months back, I decided to write a Simple ToDo app for Android, then I hooked it up to a cloud backend, using Juju. That was my first Android application, so I got to experience first hand the latest developer documentation and development environment.

Last month, Canonical launched Ubuntu for Phones, that gave me the idea to re-write the same application on QML using the Ubuntu Components.

Clearly comparing a new SDK-Alpha with a stable platform like Android will seem hardly fair, however, keep reading as you might be surprised of the results.

QML vs Dalvik Java

Lets start with QT/QML vs Dalvik/Java – I found QML really easy to get to grips with and be productive. I had the UI (see picture below) running in no time and I would say much faster than with Android.  QML is a very flexible declarative environment that allows you to embedded quick logic into the layout. This is a blessing and  a curse.

While with Android, it was very easy to keep a nice MVC  separation, I struggled to stop the leaks in QML. So while it is very easy to quickly write a functional application, it does not impose what you would consider as good development practices.

In summary, they are both very powerful development environments.

todoapp

IDE: Eclipse vs QtCreator

Part of the development experience is the IDE. I must say that I simply love the QTCreator. Possibly not as polish as Eclipse but you don’t need to read a manual to use it. Also, with a quick integration with the HUD, it is just very simple to use.

So what is QTCreator missing? A good emulator. The Android Development Kit (ADK) provides a really good user experience to develop mobile solutions. QMLScene gives you similar functionality but does not simulate a phone environment. However, all the technology is there, and  I am sure that will be included in the v1.0 version of the SDK.

Documentation

I can’t fault Android developer documentation, but taking into account its popularity, you  wouldn’t expect anything else.

I was very surprise of the quality of information on http://developer.ubuntu.com/ and specially with the component showcase.

componentshowcase

The only thing to watch out for is that in Android you can get all the info you need from a single website. With QML you quickly end up pinging between Digia, Nokia and Ubuntu pages.

The Code

The code is on my launchpad repos. The actual source functionality is not finished as I am still trying to figure out how to add menu options to access Done items. Anyway, the whole thing is pretty compact compare to the Dalvik code. The actual logic is almost identical in both. A ListView that is populate from an List model. All the data is persisted in SQLite db.

Conclusion

Both environments have been equally painless to work with, the difference is that the Ubuntu environment has *just* been released as an Alpha. I think this is the start of a very vibrant App development ecosystem.


Read more
Victor Palau

A very brief note to let you all know that I have moved the chromium test extension for browsing simulation under the Ubuntu-nexus7. Please submit improvements at your leasure:

https://code.launchpad.net/~ubuntu-nexus7/ubuntu-nexus7/chromium_extension


Read more
Victor Palau

To make it easier to keep up with the work and progress on the Nexus 7 , I have set up a topic in status.ubuntu.com and a wiki page with the performance goals for the release:

If there is  a missing Blueprint that should be track under this topic, please let me know.

 


Read more
Victor Palau

Yesterday I mentioned how I got 7 hours of battery life whilst browsing, this was done at a brightness level of 76. After that I decided to run the test again but set the brightness level to 40. This gave me an extra hour , which is about 14% extra battery life. Was I expecting more? perhaps..

 


Read more
Victor Palau

I stumbled upon a Chrome OS test case that includes a chromium-browser extension that simulates user browsing. The extension does a 1 hour test split by:

  • [First 60% of the test] Browsing: a new website is loaded every minute.  The web page loaded is scrolled down one page every second, then scrolled back up one page every second.
  • [Next 20%] Email: Gmail is loaded in the foreground tab and audio is streamed from a background tab.
  • [Next 10%] Documents: Various Google Docs are loaded.
  • [Final 10%] Video: A full screen 480p YouTube Video is played.

Besides the fact that the audio requires flash, everything else worked in the Nexus 7. After a few tweaks to the extension, I had it running on a loop for 24 hours. Also, I changed it so the auto-browsing would start as soon as you launch chromium.

The next thing to do was to write a simple bash script that would launch the browser and log battery life and screen brightness to a file every 15 min. The assumption was that as the system run out of battery it would shutdown, and that last entry in the file would give me the battery life whilst browsing.

  • Battery levels can be read from here (thanks ogra!): /sys/class/power_supply/battery/capacity
  • Brightness levels can be read from here: /sys/class/backlight/pwm-backlight/brightness

I set it to run overnight at a screen brightness of 99. The good news is that the system suspended rather than just run out of juice at about 4:51 AM (according to the browser history).  3 hours later, I resumed it to find it in a good state.

All and all - the Nexus 7 with Ubuntu was browsing for just over 7 hours (7 hours and 12 minutes), so I am pretty happy with that. Although, for any reliable benchmarking, I would need at least 10 samples of the test run. If you want to check out the test, you can find all the code here: http://bazaar.launchpad.net/~vtuson/+junk/load_test_nexus7/

Here is a graphical representation of the results:

The brightness “auto-dim” was a bit disappointing, not to say erratic, and I have filed a couple of bugs against it.


Read more
Victor Palau

I decided to run some browser performance benchmarks from http://peacekeeper.futuremark.com/ in the Nexus 7 running Ubuntu, mainly to see how it compares with other platforms. Here are my basic conclusions as a result of the test:

  • In general Ubuntu + Nexus 7 performs pretty well
  • The Nexus 7 with Ubuntu and Chromium (629) performs better that the Android Nexus 7 (489)
  • Firefox performance (257) is pretty bad compare with Chromium (629). I have tested it in my laptop and the same different exist, however the more powerful hardware makes it not as relevant.

Unfortunately, I wasn’t able to access the detailed results (it displays blank), any suggestions why? My results are the bottom firefox (257) results, and the top Chrome (629):


Read more
Victor Palau

I just proposed the following blueprint  for UDS-R, and I though I will share it here to give it more visibility:

https://blueprints.launchpad.net/ubuntu/+spec/topic-raring-desktop-targets-for-embedded

What does it take to run Ubuntu Desktop on mobile devices?

It’s time to look at the core of Ubuntu and review it through a mobile lens. During 13.04, we will like to measure and improve how the guts of our platform performs against mobile metrics.

Things like battery life, memory footprint, support for sensors… are areas where needs and expectation widely vary between a PC and a mobile devices. 13.04 will be a cycle of exploration and learning. Because there is no better way to learn that getting your hands dirty, our practical exercise will be to get Ubuntu Desktop working on the Nexus 7.

The Nexus 7 exercise will be less like a 100 meters sprint (if you don’t cross the finish line you don’t get a score) and more like Javelin competition. The further that we can throw it, the higher the score!

On those basis, here are 8 types of Javelins to throw and some distance markers to hit for Ubuntu Desktop on Nexus 7:

*Memory Usage* ->Desktop runs well with 1GB RAM ->Desktop, Web Browser and email app all run well within 1GB -> Desktop runs well with 512MB -> Desktop, Web Browser and email app all run well within 512MB

*Power Mangement* -> Instant on ->Suspend/Resume 100 cycles with only 1 error -> boot up time <1 min -> Sensible Auto Suspend policy

*Battery Life* -> CPU on idle <1% -> Standby battery life is > 150 hours -> Battery life while browsing is > 8 hours -> Battery life playing HD video is > 5 hours -> Standby battery life is > 275 hours

*Testing* -> Functional shell test that can be loaded manually into the ROM ->Performance tests can be run -> Automated battery life test -> Automated battery life test

*Desktop Apps* -> Web browser boots < 3 sec -> Email client (local or web apps) -> Music Player -> Video Player -> Games

*Desktop Unity Performance* -> Fast App-Stack switching -> Launcher Reveal time < 2 secs -> Dash Reveal time < 3 secs ->Dash search < 5 sec ->Unity performs >60 FPS

*Functionality* -> Unity Desktop works ->touch input performs well -> Play a youtube video of a cat -> Play an HD movie -> Ubuntu one

*Sensors* -> Mic & Wifi -> Touch -> Camera -> position awareness sensors -> NFC

Click in the blueprint to see a summary of other releated UDS-R sessions.


Read more