Wednesday, June 29, 2011

Late Orders : Soap ASP.NET WebService & Android Ksoap2 Client

Here it is the source code and pictures from a sample application that exposes an ASP.NET 
SOAP webservice that is consumed in an Android Java Client ... 


How to load into Eclipse a project from Google.Code via subversion
How to add Android plugin to Eclipse Indigo


LateOrdersByZone extends ListActivity 


ViewsActivity : 
startActivity(new Intent(this, LateOrdersByZone.class));


Order[] allOrders;
Vector vectorOfStrings = new Vector();



int orderCount = vectorOfStrings.size();
String[] orderTimeStamps = new String[orderCount];
vectorOfStrings.copyInto(orderTimeStamps); 

setListAdapter(new ArrayAdapter(this,
                android.R.layout.simple_list_item_1 , orderTimeStamps));




http://code.google.com/p/jtelmon/source/browse/trunk/AndroidViews/


Order
http://code.google.com/p/jtelmon/source/browse/trunk/AndroidViews/src/net/learn2develop/AndroidViews/Order.java


LateOrdersByZone
http://code.google.com/p/jtelmon/source/browse/trunk/AndroidViews/src/net/learn2develop/AndroidViews/LateOrdersByZone.java


Copy1OfLateOrdersByZone


Copy2OfLateOrdersByZone


Copy3OfLateOrdersByZone






ASP.NET WebService : Orders2a.asmx 









what we want to do in a few years ...


Friday, June 10, 2011

ChromeBooks first - ChromePhones next ?


Google Chromebooks finally go on sale: Available 15th June


What if chromebooks are the second test ( after cr48 ) , 
and the final products will be the CHROME-PHONES ? 
In the case Oracle will win the Android-Java lawsuit ,
and the royalties for Android ( ORCL+MSFT) will be too high , 
Google can propose to smartphone makers another OS  ...
this time : royalty-free !

Tuesday, May 24, 2011

What is Android?

Beginning Android Gingerbread, Part 1

Beginning Android Gingerbread, Part 4


Q:

  1. What is Android?
  2. What is Dalvik?
  3. What is Gingerbread?
  4. What operating systems does Gingerbread/2.3.3 support?
  5. Does Gingerbread/2.3.3 support Java SE 6 APIs?
  6. Identify the three directories that are initially stored in the android-sdk-windows home directory.
  7. What is the difference between the SDK Manager and android tools?
  8. What does the emulator tool accomplish?
  9. When you start SDK Manager, what dialog boxes are presented?
  10. Which package is installed by default?
  11. What additional packages need to be installed so that you can develop with Gingerbread/2.3.3?
  12. Identify the directories that are added to android-sdk-windows as a result of installing Gingerbread/2.3.3. 

A:

1. Android is Google's operating system for mobile devices. It consists of an application framework, libraries, and a Dalvik
   virtual machine-based runtime environment that collectively run on top of a modified Linux kernel.

2. Dalvik is a non-Java virtual machine that's based on processor registers instead of a stack. It was created by Google
   employee Dan Bornstein, who named Dalvik after an Icelandic fishing village from where some of his ancestors originated.

3. Gingerbread is the nickname for version 2.3 of the Android platform and its 2.3.1 and 2.3.3 successors.

4. Gingerbread/2.3.3 supports the Windows XP (32-bit), Vista (32- or 64-bit), Windows 7 (32- or 64-bit), Mac OS X 10.5.8 or
   later (x86 only), and Linux (tested on Ubuntu Linux, Lucid Lynx) operating systems.

5. Gingerbread/2.3.3 does not support Java SE 6 APIs.

6. The three directories that are initially stored in the android-sdk-windows home directory are add-ons, platforms, and
   tools.

7. The difference between the SDK Manager and android tools is that SDK Manager lets you create AVDs, install SDK components,
   and more via a graphical user interface, whereas android lets you create Android projects, create AVDs, and more via a
   command-line-oriented user interface. Also, android presents SDK Manager's Android SDK and AVD Manager dialog box when
   invoked with no command-line arguments.

8. The emulator tool launches an AVD by creating a complete Android software stack down to the Linux kernel level; the
   emulated Android device includes preinstalled apps (such as Phone) that you can launch.

9. When you start SDK Manager, the Android SDK and AVD Manager dialog box, followed by the Refresh Sources and Choose
   Packages to Install dialog boxes are presented.

10. The Android SDK Tools, revision 10 package is installed by default.

11. The Android SDK Platform-tools, revision 3 and SDK Platform Android 2.3.3, API 10, revision 1 packages need to be
    installed so that you can develop with Gingerbread/2.3.3.

12. The platform-tools directory is added to android-sdk-windows and the android-10 directory is added to
    android-sdk-windows\platforms as a result of installing Gingerbread/2.3.3.

MAC hare - PC tortoise


Where in the world are Mac sales growing? Everywhere!
Mac is the hare, PC the tortoise... 


Business is booming: Apple MAC shipments to business were up 66% (vs. 4.5%) in March 2011.
Business sales in the December quarter, were up 65.4% (vs. 9.7%). 






Mac sales growth outpaced the Microsoft Windows PC market in the March quarter
-- the 20th quarter in row it has done so.



Friday, May 20, 2011

IBM greater than Microsoft

IBM Worth More Than Microsoft ?


For one brief, shining moment , IBM passed Microsoft  in stock-market capitalization. The folks at IBM have been keeping score ever since Mister Softy surpassed Big Blue as the biggest of the tech behemoths nearly 20 years ago.

not quite big surprise as long as 

let's remember that 
 and ...

Microsoft's biggest mobile money-maker is Android, not Windows Phone 7



Beginning of the end for Microsoft's Ballmer?

Plenty has gone wrong on Ballmer's watch --- Google became dominant on the Internet and mobile. Microsoft has become reliant on yesterday's technology ... 



FOR ITS PART, IBM IS ONE of the few pioneering computer companies to survive the transition from mainframes and mini-computers to the client-server era, which has been dominated by Microsoft and its Windows and Office software. IBM toiled in low-margin personal-computer hardware, while Gates & Co. profited from Microsoft's ubiquitous operating system. IBM eventually sold its PC business to China's Lenovo, increased investments in enterprise servers and storage and expanded heavily into higher-margin software and consulting services.

Thursday, May 19, 2011

FTP and e-mail on the same server

Setting up VSFTP using non-local users.


If an administrator wants for roadwarriors to set up on the same server
email and FTP , it's better that the FTP account has virtual users .

/etc/vsftpd/vsftpd.conf


local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
# Virtual users will be logged into /home/virtualftp/[username]/
user_sub_token=$USER
local_root=/home/virtualftp/$USER
guest_enable=YES
guest_username=virtualftp
# Umask applied for virtual users and anon
anon_umask=0022
# Allows uploading by virtual users
anon_upload_enable=YES
# Allows creation of directories by virtual users
anon_mkdir_write_enable=YES
# Allows deletion of files and directories by virtual users
anon_other_write_enable=YES
# Sets a port range for passive mode. (must configure firewall to accept)
pasv_max_port=51123
pasv_min_port=51323
port_enable=YES
Setup virtual FTP usernames and their passwords (use the following format)
/etc/vsftpd/vsftpd_users.txt
username1
passwordforusername1
username2
passwordforusername2
username3
passwordforusername3
Build the vsftpd database
#db42_load -T -t hash -f /etc/vsftpd/vsftpd_users.txt /etc/vsftpd/vsftpd_users.db
#chmod 600 /etc/vsftpd/vsftpd_users.db /etc/vsftpd/vsftpd_users.txt
Create directories for each virtual FTP user
#mkdir -p /home/virtualftp/username1
Test an FTP virtual user login
#ftp localhost
Connected to localhost.
220 (vsFTPd 2.0.5)
Name (localhost:root): username1
331 Please specify the password.
Password:
230 Login successful.

Setting up VSFTPD permissions


I'm setting up a php-driven web app that serves files through a web interface. I've also set up a vsftp server to allow users to upload their data to a virtual directory. The vsftp server uses the pam-mysql module to use the web app's user database so no accounts are created on the system and we can disable ssh access.

Apache and vsftp run as different users , so we needed a way for each of them to view and edit the files created by the other. What we wound up doing was creating a group www-users and make it the group owner of /var/www. Then assigning the users apache and nobody to the group and set the permissons on the /var/www directory to 775. This will allow nobody and any other users in the www-users group to read and write to /var/www; it will also make it easier to authorize other users to write to /var/www — simply assign the user to the www-users group. Here are the steps in case any googlers need a hint.

1) set up vsftpd for umask 0027 (/etc/vsftpd.conf) [local_umask=0027]
2) create www-users group (groupadd www-users)
3) add user to group (usermod -a -G group user)
4) Set apache to run as www-users group (httpd.conf)
5) chgrp www-users /var/www
6) chmod 2775 /var/www
7) Add setgid permission to the directory: chmod g+s /var/www (I believe this is redundant)

Nokia must hide WP7

   In order to sell the phones with WP7 , Nokia will have to hide from the potential buyers the fact that its phones has a Windows operating system . So, why bother switching away from Symbian ?
Taking into account the fact that Microsoft and Nokia lost about half of the market share in one year , one can estimate that in the next year they can loose another half of what's left ...
So, it's probable that when Nokia will actually ship phones with WP7 , the combined market share of Nokia-Microsoft ECOSYSTEM will be aroud 10% ...
What will hapen with Windows 8 on ARM ? Will Microsoft advertise the fact that
you will spend less time with an ARM Windows 8 tablet ? ( in contrast with an iPad 3 )



Report warns Windows Phone 7 suffers from the "Your-dad-uses-it" syndrome

Gartner: Android and Apple win big globally in Q1

Microsoft sells 1.6 million Windows Phone 7 devices in Q1

Android, which Google executives said is being activated on 400,000 devices daily, tripled its market share from Q1 2010, with Samsung, HTC and Motorola shipping the lion's share of these phones.


Microsoft must adapt WP7 for tablets
So far, Microsoft has said that it plans to offer Windows Phone 7 on smartphones and Windows 7 on tablets. But that’s a mistake. As Apple and Google have shown, adapting smartphone-focused operating systems for tablets is actually a much better idea. Plus, with the growth of tablets in today’s marketplace, bringing Windows Phone 7 to slates might help improve the appeal of Microsoft’s operating system. The time has come for Microsoft to think seriously about bringing Windows Phone 7 to tablets.

Verizon HTC Trophy Windows Phone Can't Alter Microsoft's Prospects

 Microsoft’s Windows Phone sold 1.6 million units in the first quarter of 2011, according to new data from research firm Gartner. Although that pales in comparison with the number of Apple and Google devices activated during the same period, Microsoft executives’ traditional defense has been that Windows Phone is selling at a comparable rate to other first-generation platforms.