JavaForFun
11 years agoRemove old data.
Gustavo Martin Morcuende [Thu, 27 Jun 2013 00:09:38 +0000 (02:09 +0200)]
Remove old data.

11 years agoA few improvements in tests about Java Executors
Gustavo Martin Morcuende [Wed, 26 Jun 2013 23:51:21 +0000 (01:51 +0200)]
A few improvements in tests about Java Executors

11 years agoError while launching web brower and no "http://"
gumartinm [Wed, 13 Feb 2013 02:23:42 +0000 (03:23 +0100)]
Error while launching web brower and no "http://"

11 years agoRetrieving cookie from Service.
gumartinm [Sun, 16 Dec 2012 00:43:44 +0000 (01:43 +0100)]
Retrieving cookie from Service.

Using Android inter process communication.

11 years agoNo time for comments. Loads of changes.
gumartinm [Sat, 15 Dec 2012 03:45:05 +0000 (04:45 +0100)]
No time for comments. Loads of changes.

Mainly indentation changes... That sucks, but I have not time to sort indentation changes from the real ones...

11 years agoRestore interrupt status before throwing exception
gumartinm [Fri, 7 Dec 2012 18:40:20 +0000 (19:40 +0100)]
Restore interrupt status before throwing exception

Always write the restore interrupt status just after catching th Interrupted exception.
In this way you make sure the interrupt status is not lost because something in your code
throws an exception before the line where you actually restore the interrupt status.

12 years agoIndentation and changes that I do not remember
gumartinm [Sat, 17 Nov 2012 19:21:26 +0000 (20:21 +0100)]
Indentation and changes that I do not remember

12 years agoThe right indentation in TryCatchFinally example
gumartinm [Sat, 17 Nov 2012 19:18:39 +0000 (20:18 +0100)]
The right indentation in TryCatchFinally example

12 years agoKeyBoardDriver JavaPOS changes.
Gustavo Martin Morcuende [Sun, 5 Aug 2012 21:52:03 +0000 (23:52 +0200)]
KeyBoardDriver JavaPOS changes.

ThreadFireEvent
KeyBoardDeviceLinux

12 years agoMy first code golf: Maze, work in progress
Gustavo Martin Morcuende [Sun, 5 Aug 2012 18:01:43 +0000 (20:01 +0200)]
My first code golf: Maze, work in progress

12 years agoRemove testing code in MobiAdsLoginActivity
gumartinm [Wed, 18 Jul 2012 06:03:38 +0000 (08:03 +0200)]
Remove testing code in MobiAdsLoginActivity

12 years agoRemoving useless class.
gumartinm [Wed, 11 Jul 2012 23:39:24 +0000 (01:39 +0200)]
Removing useless class.

12 years agoMobiAds: show first the no already read ads.
gumartinm [Sun, 24 Jun 2012 01:13:48 +0000 (03:13 +0200)]
MobiAds: show first the no already read ads.

12 years agoMobiAds: update view lists when downloading ad.
gumartinm [Sat, 23 Jun 2012 23:21:25 +0000 (01:21 +0200)]
MobiAds: update view lists when downloading ad.

Registering broadcastreceivers in my activities.

12 years agoNew AdsEntryLatestAdapter no time to do it better.
gumartinm [Sat, 23 Jun 2012 22:27:31 +0000 (00:27 +0200)]
New AdsEntryLatestAdapter no time to do it better.

I should create a new class for AdsEntryAdapter in stead of two different class
for the latest ads activity and the list actvity. No time right now...

12 years agoMobiAds: fix background color and item click
gumartinm [Sat, 23 Jun 2012 22:26:01 +0000 (00:26 +0200)]
MobiAds: fix background color and item click

Background color when item selected blue by default.
URI item click was not correct.

12 years agoAndroidMobiads BroadCastReceiver working smoothly
gumartinm [Sat, 23 Jun 2012 22:03:31 +0000 (00:03 +0200)]
AndroidMobiads BroadCastReceiver working smoothly

Application looking nicer than ever!!!

12 years agoAndroid MobiAdsReloaded BroadCastReceiver
gumartinm [Fri, 22 Jun 2012 06:58:19 +0000 (08:58 +0200)]
Android MobiAdsReloaded BroadCastReceiver

12 years agoTrying to custom my action bar after logged in.
gumartinm [Thu, 21 Jun 2012 08:22:43 +0000 (10:22 +0200)]
Trying to custom my action bar after logged in.

WIP

12 years agoNew MobiAds Android implementation.
gumartinm [Wed, 20 Jun 2012 06:36:51 +0000 (08:36 +0200)]
New MobiAds Android implementation.

Because the tabs are really complicated and they (IMHO)
do not suit my user's experience.

12 years agoFIX: some wrong logs in MobiAdsBatch
gumartinm [Mon, 18 Jun 2012 02:10:17 +0000 (04:10 +0200)]
FIX: some wrong logs in MobiAdsBatch

12 years agoFIX: MobiAds CHOICE_MODE_MULTIPLE_MODAL onResume
gumartinm [Mon, 18 Jun 2012 01:10:09 +0000 (03:10 +0200)]
FIX: MobiAds CHOICE_MODE_MULTIPLE_MODAL onResume

12 years agoMobiAds:i using a Contextual Action Bar.
gumartinm [Sun, 17 Jun 2012 22:28:38 +0000 (00:28 +0200)]
MobiAds:i using a Contextual Action Bar.

12 years agoFIX: Reload list if there are changes, remove ads.
gumartinm [Sun, 17 Jun 2012 03:23:14 +0000 (05:23 +0200)]
FIX: Reload list if there are changes, remove ads.

12 years agoMy first Android FragmentList.
gumartinm [Sun, 17 Jun 2012 02:28:51 +0000 (04:28 +0200)]
My first Android FragmentList.

It looks like a nice implementation.

12 years agoNew MobiAds Android implementation: with tabs.
gumartinm [Fri, 15 Jun 2012 00:47:01 +0000 (02:47 +0200)]
New MobiAds Android implementation: with tabs.

12 years agoNo time for comments...
gumartinm [Mon, 11 Jun 2012 05:22:06 +0000 (07:22 +0200)]
No time for comments...

12 years agoLatest changes in Android mobiads application.
gumartinm [Sun, 10 Jun 2012 22:27:06 +0000 (00:27 +0200)]
Latest changes in Android mobiads application.

No time for comments.  :(

12 years agoLatest changes in Android MobiAds application.
gumartinm [Fri, 8 Jun 2012 07:05:58 +0000 (09:05 +0200)]
Latest changes in Android MobiAds application.

12 years agoReal GPS coordinates in MobiAds application.
gumartinm [Tue, 29 May 2012 07:03:06 +0000 (09:03 +0200)]
Real GPS coordinates in MobiAds application.

I was using faked coordinates.

12 years agoJavaPOS: claim method thread-safety.
gumartinm [Sun, 27 May 2012 22:32:48 +0000 (00:32 +0200)]
JavaPOS: claim method thread-safety.

Capabilities: useful in the same and different Java process.
It can not work with more than one instance of the same JavaPOS driver.

12 years agoLatest changes in Android MobiAds
gumartinm [Wed, 23 May 2012 07:08:17 +0000 (09:08 +0200)]
Latest changes in Android MobiAds

No time for comments

12 years agoNotification changes when an ad is received.
gumartinm [Sun, 6 May 2012 19:57:22 +0000 (21:57 +0200)]
Notification changes when an ad is received.

12 years agoImproving my JavaPOS keyboard driver.
gumartinm [Sun, 6 May 2012 04:17:13 +0000 (06:17 +0200)]
Improving my JavaPOS keyboard driver.

Using in the claim method explicit Locks instead of synchronized.
In this way we can throw an exception in case of we lock for a time up to timeout.

12 years agoList with web links.
gumartinm [Fri, 4 May 2012 06:51:39 +0000 (08:51 +0200)]
List with web links.

Click on the item and you go to the specified web advertising.

12 years agoLatest changes in Android MobiAds.
gumartinm [Thu, 3 May 2012 00:50:29 +0000 (02:50 +0200)]
Latest changes in Android MobiAds.

List with the received ads.

12 years agoExamples: try/catch/finally blocks and exceptions.
gumartinm [Wed, 2 May 2012 16:13:49 +0000 (18:13 +0200)]
Examples: try/catch/finally blocks and exceptions.

12 years agoImproving my Android Simple Tetris.
gumartinm [Tue, 1 May 2012 23:31:49 +0000 (01:31 +0200)]
Improving my Android Simple Tetris.

Now, with score and level.

12 years agoWorking on my JavaPOS keyboard driver.
gumartinm [Mon, 30 Apr 2012 07:24:26 +0000 (09:24 +0200)]
Working on my JavaPOS keyboard driver.

No time for comments...

12 years agoWorking on my simple Android tetris.
gumartinm [Thu, 26 Apr 2012 07:45:10 +0000 (09:45 +0200)]
Working on my simple Android tetris.

Using GestureListener and nested views.

12 years agoWorking on my AndroidTetris.
gumartinm [Tue, 24 Apr 2012 07:10:27 +0000 (09:10 +0200)]
Working on my AndroidTetris.

Messing around with the views.

12 years agoAndroid MobiAds: using the cookie in a nasty way.
gumartinm [Tue, 24 Apr 2012 07:08:08 +0000 (09:08 +0200)]
Android MobiAds: using the cookie in a nasty way.

I have to improve it. Should I use a singleton in order to share the cookie between activities
in the same java process?

12 years agoJavaPOS: fire event thread.
gumartinm [Tue, 24 Apr 2012 07:00:44 +0000 (09:00 +0200)]
JavaPOS: fire event thread.

I missed this class in the last commit related to JavaPOS...

12 years agoAndroid lists: nice example.
gumartinm [Tue, 24 Apr 2012 06:59:45 +0000 (08:59 +0200)]
Android lists: nice example.

From: http://www.learn-android.com/2011/11/22/lots-of-lists-custom-adapter/

12 years agoJavaPOS: Working on the fire even thread.
gumartinm [Tue, 24 Apr 2012 06:58:44 +0000 (08:58 +0200)]
JavaPOS: Working on the fire even thread.

12 years agoMock locations just in the emulator.
gumartinm [Wed, 18 Apr 2012 07:14:22 +0000 (09:14 +0200)]
Mock locations just in the emulator.

Do not know how to do it in the phiscal device.

12 years agoKeep improving my JavaPOS keyboard driver.
gumartinm [Mon, 16 Apr 2012 23:20:30 +0000 (01:20 +0200)]
Keep improving my JavaPOS keyboard driver.

No time for comments, sorry.

12 years agoWorking on my JavaPOS driver.
gumartinm [Mon, 16 Apr 2012 07:57:51 +0000 (09:57 +0200)]
Working on my JavaPOS driver.

No time for comments...

12 years agoTrying to write a nice claim implementation.
gumartinm [Fri, 13 Apr 2012 07:22:31 +0000 (09:22 +0200)]
Trying to write a nice claim implementation.

I do not like the way I have written the claim and release methods.
Trying to figure out how to do it in a right way.

12 years agoJavaPOS keyboard driver. Some improvements.
gumartinm [Wed, 11 Apr 2012 05:50:08 +0000 (07:50 +0200)]
JavaPOS keyboard driver. Some improvements.

1. claim
2. release
3. If I want to reach the second level of Exception Safety, it must be done
in the upper layer of my JavaPOS driver using try/finally not in the hardware layer.
4. Spanish comments that must be removed when the driver is finished (I am still working on it)

12 years agoWorking on my JavaPOS keyboard driver.
gumartinm [Tue, 10 Apr 2012 07:22:54 +0000 (09:22 +0200)]
Working on my JavaPOS keyboard driver.

Trying to reach second leven of exception safety.
Doubts about where I should reach that level. In the driver layer or in upper layers?

12 years agoJavaPOS claim method. Nice implementation.
gumartinm [Sat, 7 Apr 2012 22:34:53 +0000 (00:34 +0200)]
JavaPOS claim method. Nice implementation.

Locking system files in order to implement the detection of claimed devices
from different processes. Hopeffully it will work as expected...

12 years agoMessing around with JavaNIO Channels and Locks.
gumartinm [Wed, 4 Apr 2012 07:42:26 +0000 (09:42 +0200)]
Messing around with JavaNIO Channels and Locks.

Trying to use JavaNIO in the JavaPOS keyboard driver.

12 years agoJavaPOS HW driver class. Remove Executor.
gumartinm [Sun, 1 Apr 2012 22:53:36 +0000 (00:53 +0200)]
JavaPOS HW driver class. Remove Executor.

Changing thread implementation in JavaPOS HW driver class. I am going to use
a simple Thread class instead of the Executor interface.

12 years agoWorking on my JavaPOS keyboard driver.
gumartinm [Sun, 1 Apr 2012 21:13:39 +0000 (23:13 +0200)]
Working on my JavaPOS keyboard driver.

Next step: using java.nio (selector) because I do not want to block on the
file descriptor's read operation.

12 years agoMobiAds android application working smoothly.
gumartinm [Fri, 30 Mar 2012 05:28:22 +0000 (07:28 +0200)]
MobiAds android application working smoothly.

Just left to improve my code.

12 years agoMany modifications in my JavaPOS key board driver.
gumartinm [Thu, 29 Mar 2012 15:12:07 +0000 (17:12 +0200)]
Many modifications in my JavaPOS key board driver.

12 years agoAndroid MobiAds appliction working.
gumartinm [Wed, 21 Mar 2012 07:10:35 +0000 (08:10 +0100)]
Android MobiAds appliction working.

Just is left to fix some issues about closing the sqlite database.

12 years agoFirst steps implementing my MobiAds Android app.
gumartinm [Mon, 19 Mar 2012 23:06:35 +0000 (00:06 +0100)]
First steps implementing my MobiAds Android app.

12 years agoLatest changes in Android Test3 application.
gumartinm [Mon, 19 Mar 2012 23:05:06 +0000 (00:05 +0100)]
Latest changes in Android Test3 application.

Next step: implement my MobiAds Android application.

12 years agoTrying to launch my service from Test3Activity.
gumartinm [Wed, 7 Mar 2012 07:13:18 +0000 (08:13 +0100)]
Trying to launch my service from Test3Activity.
I need a notification which will launch the NextActivity.
It does not work at the moment.

12 years agoI keep working on my Android service.
gumartinm [Tue, 6 Mar 2012 06:57:11 +0000 (07:57 +0100)]
I keep working on my Android service.
Implementing started and bound.

12 years agoI am not able to bind with my service :(
gumartinm [Fri, 2 Mar 2012 07:09:57 +0000 (08:09 +0100)]
I am not able to bind with my service :(
Dunno what is going on. No more time to keep trying.
I will keep working this weekend. :(

12 years agoFirst steps with android services.
gumartinm [Thu, 1 Mar 2012 07:11:17 +0000 (08:11 +0100)]
First steps with android services.
Trying to create an android service running in a different process and
using IPC. I have no time but this looks like fun.

12 years agoNext step: create a background service.
gumartinm [Wed, 29 Feb 2012 07:00:22 +0000 (08:00 +0100)]
Next step: create a background service.

12 years agoIn case of any error remove from database indexer the id
gumartinm [Tue, 28 Feb 2012 06:50:06 +0000 (07:50 +0100)]
In case of any error remove from database indexer the id
and the file or the chunk stored before the error.

12 years agoNo time, no comments...
gumartinm [Tue, 28 Feb 2012 05:19:47 +0000 (06:19 +0100)]
No time, no comments...

12 years agoNew Android API (version 15) and firs steps downloading
gumartinm [Wed, 22 Feb 2012 06:46:02 +0000 (07:46 +0100)]
New Android API (version 15) and firs steps downloading
Ads from the server using HttpClient

12 years agoQuery and Insert in Sqlite database as a atomic operation.
gumartinm [Tue, 21 Feb 2012 06:39:02 +0000 (07:39 +0100)]
Query and Insert in Sqlite database as a atomic operation.
Storing files (the ads) using the internal storage.
Just is left: improve httpclient code for downloading files and
using a service instead of an Activity

12 years agoFinishing my provider. Query and insert working smoothly.
gumartinm [Mon, 20 Feb 2012 06:58:15 +0000 (07:58 +0100)]
Finishing my provider. Query and insert working smoothly.
Next step, store the downloaded ads as files on the file system.

12 years agoLast steps with my provider.
gumartinm [Fri, 17 Feb 2012 07:07:54 +0000 (08:07 +0100)]
Last steps with my provider.
It works smoothly.

12 years agoThe first insert in my database.
gumartinm [Mon, 13 Feb 2012 07:19:21 +0000 (08:19 +0100)]
The first insert in my database.

12 years agoHaving fun with my provider. It does not work yet...
gumartinm [Fri, 10 Feb 2012 07:00:10 +0000 (08:00 +0100)]
Having fun with my provider. It does not work yet...
Working with Intents is difficult...

12 years agoFinish my SQLite Provider.
gumartinm [Wed, 8 Feb 2012 06:33:40 +0000 (07:33 +0100)]
Finish my SQLite Provider.
Next step: to test it. I did not have time to run my code
probably it is not working right now.

12 years agoImplementing an Android Provider.
gumartinm [Tue, 7 Feb 2012 07:07:09 +0000 (08:07 +0100)]
Implementing an Android Provider.
I would like to have more time to spend working
on this...

12 years agoTesting a SQLite provider.
gumartinm [Thu, 2 Feb 2012 21:31:07 +0000 (22:31 +0100)]
Testing a SQLite provider.

12 years agoNo more playing with AndroidHttpClient
gumartinm [Tue, 31 Jan 2012 06:33:23 +0000 (07:33 +0100)]
No more playing with AndroidHttpClient
Next step: sqlite Android database.

12 years agoMoving JavaFork to: https://github.com/gumartinm/JavaTCPFork
gumartinm [Sun, 29 Jan 2012 16:05:20 +0000 (17:05 +0100)]
Moving JavaFork to: https://github.com/gumartinm/JavaTCPFork
Because it is getting bigger every day. :/

12 years agoRemoving tabs, I know this should have been done before but
gumartinm [Sun, 29 Jan 2012 06:42:50 +0000 (07:42 +0100)]
Removing tabs, I know this should have been done before but
I have just found out that must be done always.

12 years agoNo time for comments.
gumartinm [Sun, 29 Jan 2012 05:22:52 +0000 (06:22 +0100)]
No time for comments.
There are not many steps left to finish this project (I hope)

12 years agoNew modifications in Java TCP fork
gumartinm [Sun, 29 Jan 2012 05:04:56 +0000 (06:04 +0100)]
New modifications in Java TCP fork

12 years agoWorking on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:29:01 +0000 (02:29 +0100)]
Working on Java TCP fork.

12 years agoI keep working on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:28:11 +0000 (02:28 +0100)]
I keep working on Java TCP fork.

12 years agoI keep woking on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:26:47 +0000 (02:26 +0100)]
I keep woking on Java TCP fork.
It is being harder than I thought.

12 years agoWorking on Java TCP fork.
gumartinm [Sun, 29 Jan 2012 01:24:17 +0000 (02:24 +0100)]
Working on Java TCP fork.
It is being harder than I thought...

12 years agoSorry, committing forgotten changes...
gumartinm [Thu, 26 Jan 2012 23:54:04 +0000 (00:54 +0100)]
Sorry, committing forgotten changes...
Just deleting files, there is nothing important about this commit.

12 years agoMany improvements in my remote TCP fork for Java
gumartinm [Thu, 26 Jan 2012 23:49:59 +0000 (00:49 +0100)]
Many improvements in my remote TCP fork for Java
I keep working on it
Next steps cleaning up the code and maybe using execve instead of system.

12 years agoMore tests using AndroidHttpClient
gumartinm [Thu, 26 Jan 2012 06:28:08 +0000 (07:28 +0100)]
More tests using AndroidHttpClient
2 requests at the same moment by default

12 years agoSIGTERM handler for Java fork process.
gumartinm [Wed, 18 Jan 2012 06:58:29 +0000 (07:58 +0100)]
SIGTERM handler for Java fork process.

12 years agoLaunch commands without using fork from the JVM.
gumartinm [Wed, 18 Jan 2012 01:19:01 +0000 (02:19 +0100)]
Launch commands without using fork from the JVM.
Sometimes you may receive a nice OutofMemory exception because of the overcommitting memory allocation,
although you could have still enough memory.
Issues related to fork and virtual memory.
See: http://developers.sun.com/solaris/articles/subprocess/subprocess.html

12 years agoLast change using HttpClient, I keep reading the API :(
gumartinm [Wed, 18 Jan 2012 00:46:40 +0000 (01:46 +0100)]
Last change using HttpClient, I keep reading the API :(

12 years agoNew class PrinterLogicalHelper replacing PrinterHelper
gumartinm [Sat, 14 Jan 2012 13:52:05 +0000 (14:52 +0100)]
New class PrinterLogicalHelper replacing PrinterHelper

12 years agoImproving a bit the HttpClient code. I keep reading about the API.
gumartinm [Thu, 5 Jan 2012 07:11:29 +0000 (08:11 +0100)]
Improving a bit the HttpClient code. I keep reading about the API.
I hope to finish this in this weekend.
I am committing white spaces, sorry for that. I am in a hurry...

12 years agoImproving the Log in main Activity. Now make more sense.
gumartinm [Wed, 4 Jan 2012 06:02:14 +0000 (07:02 +0100)]
Improving the Log in main Activity. Now make more sense.
Trying to find out how to use a response handler for HttpClient
Work in progress.
By the way, I am committing white spaces. Sorry for that but I am in a hurry.

12 years agoWorking with HttpClient and multiple threads.
gumartinm [Tue, 3 Jan 2012 06:22:37 +0000 (07:22 +0100)]
Working with HttpClient and multiple threads.
Work in progress. It is not working right now.

12 years agoExamples with Executors (Java Concurrent library)
gumartinm [Sun, 1 Jan 2012 09:45:12 +0000 (10:45 +0100)]
Examples with Executors (Java Concurrent library)

12 years agoAnother nice example using Advices. You can define an Advice without a PointCut method.
gumartinm [Sun, 1 Jan 2012 07:17:31 +0000 (08:17 +0100)]
Another nice example using Advices. You can define an Advice without a PointCut method.
The Advice itself may define the PointCut.

12 years agoSome nice examples using threads without executors.
gumartinm [Fri, 30 Dec 2011 05:58:14 +0000 (06:58 +0100)]
Some nice examples using threads without executors.

12 years agoExecutor Thread Poll with a tasks max number.
gumartinm [Wed, 28 Dec 2011 06:22:53 +0000 (07:22 +0100)]
Executor Thread Poll with a tasks max number.
Next step: using SQLITE

12 years ago1. Parsing JSON data from a RESTful Web Service. DONE.
gumartinm [Tue, 27 Dec 2011 06:21:36 +0000 (07:21 +0100)]
1. Parsing JSON data from a RESTful Web Service. DONE.
2. Download file. DONE

Next steps: we need to use the SQLITE database. There, we are going to store
the index for every downloaded file. With the advertisement id retrieved from
the JSON RESTful response, we have a unique identifier for the downloaded ad.
We are going to use that id to find out if we have to download a file because
we do not have it on the mobile or we can skip the download because it was already
downloaded.