Browsing articles in "programming"
Jan 19, 2013
heldervasc

mybash – Advanced features for your bash shell environments

mybash

Features

  • Profiles: Manage the bash shell environment for each machine
  • Shortcuts: Create shortcuts for important filesystems paths
  • Aliases: Aliases for your most important tools

To Install mybash on your computer

git clone git@github.com:hvasconcelos/mybash.git
cd mybash
ln -sf `$pwd`/.bashrc ~/.bashrc
ln -sf `$pwd`/.bash ~/.bash

Create a new mybash profile

> .bash/profiles/<profile_name>
chmod +ux .bash/profiles/<profile_name>

Example:

vim .bash/profiles/macbookpro_home
export_dir_after /Users/hcv/Desktop/Android/sdk/tools
export_dir_after /Users/hcv/Desktop/Android/sdk/platform-tools
export_dir_after ~/bin
export_dir_before /usr/local/sbin
export_dir_before /usr/local/bin
addidir projs /Users/hcv/Desktop/beartouch/Projects
addidir blib /Users/hcv/Desktop/beartouch/Libraries
chmod +ux .bash/profiles/macbookpro_home

Select the profile in vim .bashrc

set_profile <profile_name>

Example:

vim ~/.bashrc
set_profile macbookpro_home

Create a shorcut to a filesystem path

In a profile like “.bash/profiles/macbookpro_home” add something like

addidir <shortcutname> <path>

List your shortcuts

lidir
projs /Users/heldervasconcelos/Desktop/beartouch/Projects
blib /Users/heldervasconcelos/Desktop/beartouch/Libraries

Goto to a filesystem path over a shorcut

goto <shortcutname>

Exemplo:

goto projs
pwd
/Users/heldervasconcelos/Desktop/beartouch/Projects

Clone mybash  on Github

Apr 24, 2012
heldervasc

Bearstouch Software as Software Partner have been developing Mobitto Android Mobile App

Last month our work were very tight,  in cooperation with the Mobitto team we have been developing and improving the Mobitto mobile application for Android operating system.   We are very pleased with the first results but there is a lot of work to do… .

The android application was built  following the features available of Mobitto IPhone version and now,on the android version, you already can locate on google maps the best offers in your area or explore the available offers in categories.

What is Mobitto?

Is a lifestyle plattform that discover to you the best store offers in your area.
With mobitto you can grab special concerts ticket discounts, special offers from restaurants , special discount from arts events and so on ….
To get more info about it , check out mobitto website.

The Android Application Beta version is already available on Google Play.


Android app on Google Play

 

Feb 1, 2012
heldervasc

Android Image Resizer – New Open Source Android Developer Tool

What is Android Image Resizer?

Android Image Resizer is a tool to automate android project image files resizing for all screen density supported by your app.

For example a image in res/drawable/xhdpi with 200x200px as a base file will be resized to :

  • res/drawable/hdpi with 150×150 px
  • res/drawable/mdpi with 100×100 px
  • res/drawable/ldpi with 75×75 px

Install Instructions

gem install android_img_resizer

Note: For Mac OSX you need to install rimagick first. Please follow the instructions described in this page rimagick

How To use it

In a Android Project directory (PATH that has a AndroidManifest.xml) please type:

To list all drawable resource imagefiles

android_img_resizer list [xhdpi|hdpi]

To Resize a resource image File

android_img_resizer img <image_file> [xhdpi|hdpi]

To Resize all resource image files

android_img_resizer all [xhdpi|hdpi]

Note: by default Android Image resizer will use xhdpi as base image file.

To use hdpi as base image file please type hdpi in the optional argument

Resize a image example:

cd /home/john/WorkSpace/smssheduler
android_img_resizer img ic_home_log.png
OUTPUT:
Resizing Image = ic_home_log.png with size = 64×64
Image = ic_home_log.png hdpi = 48×48
Image = ic_home_log.png mdpi = 32×32
Image = ic_home_log.png ldpi = 24×24

Resize all images example:

cd /home/john/WorkSpace/smssheduler
android_img_resizer all xhdpi
OUTPUT:
Resizing Image = ic_micro_site.png with size = 64×64
Image = ic_micro_site.png hdpi = 48×48
Image = ic_micro_site.png mdpi = 32×32
Image = ic_micro_site.png ldpi = 24×24
Resizing Image = ic_micro_logo.png with size = 64×64
Image = ic_micro_logo.png hdpi = 48×48
Image = ic_micro_logo.png mdpi = 32×32
Image = ic_micro_logo.png ldpi = 24×24
…..

License and copyright

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

Contributions are welcome ! The project is mainly missing documentation and examples…

Bearstouch Team

Nov 25, 2011
heldervasc

Open Source Android Market Ruby API

What is Android Market Ruby API ??

Android Market API is an open source Android Market Ruby Library created by Bearstouch Software for parsing Android Market information.

Whit this API you can get all information supplied by Android Market and analise top selling apps ,free and paid, for a category or the overall ranking .

Source Code on GitHub

https://github.com/bearstouch/android_market_api

Install Instructions

Install it with RubyGems

1
gem install android_market_api

or add this to your Gemfile if you use Bundler:


1
gem "android_market_api"

Getting started

Parsing an application on Android Market

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
require 'rubygems'
require 'android_market_api'

app=AndroidMarketApplication.new('com.bearstouch.smsscheduler')

# Getting Application Name  
puts app.name            

# Getting Application Current Version
puts app.current_version

# Getting Application Price
puts app.price            

# Getting Ratting Value
puts app.ratting_value

# Getting  Nr of Votes
puts app.ratting_count

# Getting  Last Update datetime
puts app.updated  

# Getting  SDK Required
puts app.sdk_required

# Getting  Download category
puts app.downloads

# Getting  Application Size
puts app.size

# Getting  Content Ratting
puts app.contentRating

# Getting  Application description
puts app.description

# Getting Developer Name      
puts app.developer_name

# Getting Icon URL    
puts app.icon

# Getting Screenshot URLs Array
puts app.screenshots

# Getting Last Updates Array
puts app.update_text

Full Documentation

http://rubydoc.info/gems/android_market_api/0.3.2/frames

WIKI

https://github.com/bearstouch/android_market_api/wiki

Contributions are welcome ! The project is mainly missing documentation and examples…

Stay in touch with us for getting updated info about this API.

Enjoy

Bearstouch Software

Nov 1, 2011
heldervasc

Android Market Application Publish Checklist

After releasing our first app we created a checklist that could be useful for every developer that is preparing an application release on android market.

Follow the steps in the order described:

  1. Execute your units tests and verify if everything is ok
  2. Remove or Disable your application logging (In our applications we have a global instance of logging , this couldn’t be the best choice but for us works fine)
  3. Review your  AndroidManifest.xml
    • Remove android:debuggable in application element
    • Verify if android:versionCode is the correct (In every release this version code needs to be different for a successfully application upgrade )
    • Verify android:minSdkVersion and android:maxSdkVersion: this step is very important for defining device targets of your application
  4. Sign your APK  with your generated private key  ( I you need more info how to do this there is a link for android documentation )
  5. Prepare 2 or more screenshots with android market supported dimensions and specifications: 320 x 480, 480 x 800, 480 x 854, 1280 x 720, 1280 x 800 (dimensions in pixels) 24 bit PNG or JPEG (no transparency) 
  6. Prepare a great icon image,32 bit PNG or JPEG, in your preferred image editor with 512×512 px   32 bit PNG or JPEG
  7. Prepare a promotional graphic with 180 x 120 px 24 bit PNG or JPEG (no transparency)
  8. Prepare a feature graphic with 1024 x 500 px , 24 bit PNG or JPEG (no transparency)
  9. Prepare a description text for every native language supported by your app – max 500 characters
  10. Prepare a short promotion text for every native language suported by your app -max 80 characters
  11. After following the previous steps you are ready to login in Android Market with your developer account https://market.android.com/publish and publish the application

Note: If you think that we missed some important steps, please help us improving this list and post a comment describing it.

Bearstouch Team