I don’t know whether my question makes sense or not. But here is what I have done.
First trial with Java application:
– I created sample Java project.
– Added jedis jar file to it.
– Established a connection like,
Jedis jedis = new Jedis("my IP address");
jedis.connect();
String value = jedis.get("foo"); //I have set the value for "foo" in redis
System.out.println(value); //successfully prints foo in console when ran as Java application
Now I tried the same thing in Android application, but it failed
setContentView(R.layout.activity_main_activity_jedis);
Jedis jedis = new Jedis("my IP address");
jedis.connect();
String value = jedis.get("foo");
TextView tv = (TextView)findViewById(R.id.text);
tv.setText(value);
My aim is to get the data from Redis and display it in my Android application. Please help !
This issue got resolved. I have added user-permissions for INTERNET in manifest file. Its working fine now. Thanks to all !