On 29th January in European Center of Solidarność in Gdańsk were announced results of BIHAPI competition. First winner of competition was "CoSieStao" which allows users access to various types of information related with town/district where they live. Application was created by Paweł Konieczny and Piotr Martyniak. There were also awarded such applications like "Via CRM the first passenger relationship management in the world", "Poczytaj mi", "Stacz kolejkowy" and "IfCity". More information about competition and awarded applications can be found under www.bihapi.pl.
Competition partners :
Oracle Communication (technology partner), Capital City Warsaw, Gdańsk, Poznań, Poznańskie Centrum Superkomputerowo-Sieciowe, IQ Partners, Black Pearls, SpeedUp Group, Investin, Fundacja TechSoup, Orange Foundation, Fundacja Pracownia badań i innowacji społecznych Stocznia, Centrum Cyfrowe Fundacja Projekt: Polska, geecon.org, Gdański Park Naukowo-Techniczny, Uniwersytet Ekonomiczny w Poznaniu, Warsaw University of Technology, Międzynarodowe Targi Poznańskie.
![]() |
| BIHAPI Grand Prix |
One of my Android applications requires to fetch and process external RSS resource. My first thought was that I should use very useful and well documented library called ROME [1]. Unfortunately I had some difficulties using this library because of there is a lack of java.beans package in Android's Java API implementation [2]. Of course you can fix this issue by installing some missing packages, but I was looking for some out-of-box solution. Finally, I found library called Simple Feed Parser [3]. It may for some of you be quite outdated (last commit was 4 years ago) and I found that there is a some issue with accessing date of single RSS entry, but it has very simple implementation, it is compatible with Android SDKs and it does not require any further library dependencies! Below you can find some example usage of this library in Java.
import com.ernieyu.feedparser.Feed;
import com.ernieyu.feedparser.FeedException;
import com.ernieyu.feedparser.FeedParser;
import com.ernieyu.feedparser.FeedParserFactory;
import com.ernieyu.feedparser.Item;
try {
InputStream inputstream = new URL("http://rss.android.com/rss).openStream();
FeedParser parser = FeedParserFactory.newParser();
Feed feed = parser.parse(inputstream);
List- itemList = feed.getItemList();
for (Item item : itemList) {
logger.info("Title : " + item.getTitle());
logger.info("Item : " + item.getLink());
logger.info("Description : " + item.getDescription());
logger.info("Date : " + item.getPubDate()); //might be null
}
} catch (IOException e) {
logger.info("IOException : " + e.getMessage());
} catch (FeedException e) {
logger.info("FeedException : " + e.getMessage());
}
References : [1] ROME - All feeds lead to Rome! [2] Java.Beans on Android [3] Simple Feed Parser
For some of you I have this very useful command line for getting Android Debug Key which can be used for signing Android applications.
Alias name: androiddebugkey
Creation date: 2014-12-18
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 32435620
Valid from: Thu Dec 18 21:04:11 CET 2014 until: Sat Dec 10 21:04:11 CET 2044
Certificate fingerprints:
MD5: XXX
SHA1: XXX
SHA256: XXX
Signature algorithm name: SHA256withRSA
Version: 3
Extensions:
#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 20 B4 60 1E 46 B5 AD B0 45 49 93 48 C2 D6 0C BF .`.F...EI.H....
0010: 9C CD 8D 02 ....
]
]
Information under SHA1 can be used to signing Android apps. More information about signing Android apps you can find under this link Developer.android.com - App Signing.
When you get this message - "ADB not responding. You can wait more or kill adb ..." just use this command :
Recently in October, Orange with local authorities of towns such as Warsaw, Gdansk and Poznan, start new competition called BIHAPI (Business Intelligence Hackathon API) [1] which aims to stimulate creation of innovative applications, system and services built using API (Application Developer Interfaces). For every participant there is available about 81 API (including data cites of Warsaw, Gdansk, Poznan and Orange Telco API). More information about competition you can find under website [1].
Reference :
[1] BIHAPI
I would like to present you very quick cheat sheet about how implement RMI (Remote Method Invocation) [3] which performs the object-oriented equivalent of RPC in Spring using RmiServiceExporter [1] (used to expose RMI interface) and RmiProxyFactoryBean [2] (used to consume RMI interface).
First of all, you must create some interface which will be used to expose your methods [4]
public interface IUser {
UserDTO retrieveUserById(Long userId);
UserDTO register(UserDTO user) throws RegisterException;
}
Next provide some implementation for interface IUser in the form of class [5]
public class UserManager implements IUser {
private IUserDao userDao;
@Transactional(propagation = Propagation.REQUIRED, readOnly = true, rollbackFor = Exception.class)
public UserDTO retrieveUserById(Long userId) {
return userDao.retrieveUserById(userId);
}
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = Exception.class)
public UserDTO register(final UserDTO user) throws AVValidationException {
if (user == null) {
throw new IllegalArgumentException("Wrong params. user cannot be NULL");
}
return userDao.register(user);
}
public IUserDao getUserDao() {
return userDao;
}
public void setUserDao(final IUserDao userDao) {
this.userDao = userDao;
}
}
And of course you must provide XML Bean definition [6].Next in your XML with Beans you should export RMI using RmiServiceExporter [7].
Now you can use this RMI exposed under service name called JSUserManager after providing definition in XML Bean [8].
Please do not forget about initialization your RMI like below [9].
private void run() {
logger.info("creating ctx...");
final AbstractApplicationContext ctx;
try {
ctx = new ClassPathXmlApplicationContext(
"/garciapl-service-rmi-ctx.xml"
);
logger.info("ctx created; registering shutdown hook");
ctx.registerShutdownHook();
logger.info("Starting up the application. Stand by... ;)");
logger.info("Creating MP service...");
ctx.getBean("userManagerRMI");
} catch (Throwable e) {
logger.fatal("exception caught during initialization: ", e);
System.exit(-1);
}
logger.info("app is up and running");
synchronized (this) {
try {
wait();
} catch (InterruptedException e) {
logger.error("wait interrupted", e);
}
}
logger.info("Exiting...");
System.exit(0);
}
Reference : [1] Spring Docs - RmiServiceExporter [2] Spring Docs - RmiProxyFactoryBean [3] Oracle Docs - RMI [4] Pastebin - RMI Interface [5] Pastebin - Interface implementation [6] Pastebin - Interface implementation XML Bean [7] Pastebin - RmiServiceExporter [8] Pastebin - RmiProxyFactoryBean [9] Pastebin - Register RMI

