Renjith Mohan

Ranch Hand
+ Follow
since Nov 28, 2008
Renjith likes ...
Android Chrome Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Renjith Mohan

Yes I am. I use AsyncTask for each function. The issue seems to be here



I am not creating new HttpClient instance for every server operation. Instead use the same instance to hold user session details. On the other side, ThreadSafeClientConnManager allows me have a multi threaded environment. How could I manage user session?

Thanks in advance!
10 years ago
I have a server call to fetch JSON response. Here is the code snippet.


convertStreamToString(InputStream) read json text from the stream and returns a string text. For holding the state of the user session, same httpClient reference is being used.



The problem arises when a service starts working. It accesses the httpclient object and in turn InputStream instance. By the time, the user moves to other screen, putting service to run background. Exception is thrown when InputStream already in use is called for.



The reason being, the socket is still used by the Service class. I have heard of ThreadSafeClientConnManager class. However, not really sure if it suits in here.

Any thoughts?

Let me know in case you need more details.

Thanks in advance!
10 years ago

My aim is to send a few sets of commands to an embedded device via bluetooth. Ideally, those commands look like:



I want to dynamically set the values of NUM and DEV. One way is creating this from scratch (by attaching to StringBuffer) each time it executes. Is there any proper way of implementing?

Can we use placeholders like we do in reporting APIs?

Thanks in advance!
11 years ago

HashMap<String,String> temp5 = new HashMap<String,String>();
temp.put("name","Lohgad");
temp.put("height", "3400ft");
list.add(temp5);



Looks like you forgot to change the variable name! See variables highlighted in blue.
11 years ago
Maybe issues in the layout files. Can I see them?
11 years ago

hope this helps!
11 years ago
Please see the requirement below.

For instance, take Astro browser as a template. You might have seen context menu (with menu options such as Open as, Edit, Details and Send), popping up once an item in the list is selected. I want to implement a similar context menu, with different options, when user taps an email attachment irrespective of email clients. Ideally an option would be 'send via bluetooth', allowing the user to send the attachment straight away.

I looked for suitable APIs. However, there isn't any. This made me think about native programming. I am pretty new to those stuffs.

Could anyone throw some inputs on how to proceed?

Thanks in advance!
11 years ago

I don't really think there is a need to hide your application.

Save all data into a preference file before closing and populate them back on app restart. Make use of onDestroy() of Activity.
11 years ago

Android UI tutorial is a good play around for beginners.

Also check sample codes here

Moreover, you can find android tutorial galore in the internet.

Well, 'Professional android 2 application development' by Reto Meier is a nice starter in case you prefer reading books.

11 years ago

Oops! did I confuse you?

okay I will make it simple.

For instance, take Astro file browser. When you long tap any of the file, a menu pops up. See the attached image.

What is this menu called?

I need to implement this one in my application.

11 years ago
Thanks Tibi!

Well, I tried that snippet. It shows only view options; with a list of suitable applications with which I can open the file

11 years ago

Hey guys,

Have you seen file options (details, open as, edit and send) once an item in the file explorer is tapped?

how can I open it from code?

is there any suitable intent?

Thanks in advance
11 years ago

Hi all,
I am trying to send files to a remote bluetooth device. As a first step, I did a device discovery, listing available bluetooth devices. But, how to connect and transfer files is what confounds me. Could you please guide me through proper steps to make it work.

Lucid blogs or articles explaining the same would be appreciated.

Thanks in advance.
11 years ago
Yeah, it was my mistake

The method was always pointing to an empty else block...

Thanks Matt. Explaining the problem to you help me find the cause.


11 years ago
tried using that way. but dint work!
11 years ago