« first day (1150 days earlier)      last day (2325 days later) » 

00:00
Hello, How would I parse the third object in an JSON array in Java?
using a for loop I'm sure
I'm trying to get the Image url from this subbreddit
Happy new year from me too 🎇🎆🎉
00:17
hello
happy new year
Can i ask one question about javascript?
 
2 hours later…
01:59
no
02:11
02:27
anyhow
bye bye
 
3 hours later…
05:06
@all Happy new year:)
Hey Happy New Year to All....!!!!
Good Morning Guys :)
@Hans1984 Are you still drunk ?
05:28
ooohoo
GM fellas..:)
Good Morning Guys :) and happy new year to all :)
Hello All
Happy new yerar
*Year
@Flash @Muk @NoughT VGM! Happy new year!
for the new year I have a question in android
05:43
lol
this is about android design
Go ahead child!
I mean ask it already!
In my app there is splash activity
same to u naruto-sensai..!
@TheLittleNaruto @Flash what's the first thing you have done in new year?
05:45
In that activity i download a json string and
make the object array
@MukeshRana I talked about how my religion is and what is its specialty to one of my friend from Slovenia.
And he liked it.
The thing is I keep that object arraylist as static variable
@NoughT Why would you do so ?
but I don't want to save it as in text file or in a db
If it is large in size, I would rather go for db
05:47
but I have to use it several activities
Then use db
Because having more static variable is just not good.
No max size of it 100
Go for DB
@TheLittleNaruto meant to say you were online yesterday on new year ?
@MukeshRana Actually I didn't sleep, tbh!
I have been online since the time you left the room last day :P
05:49
the thing is If I don't want to db of save a text file I see some one mentioned keep it in singleton class
the thing is you have 100 records and in that case I would go for db only
what is that mean ??
Yes
I think you might not understand well my situation
Is each record just a String ?
05:51
give some time to write it full in a one chat
@TheLittleNaruto in ofc ?
@SweetWisherツ No! I work from home!
@TheLittleNaruto then what were you doing whole night? talking to strangers all night?
In my application I have a splash activity. In that I download a json string and make a object array list and keep that in the static array. Also in that splash activity I use getActivty().finish() . That mean when from the next activity it can’t navigate to splash activity. I use that static array in several activities.
Think if I don’t want to save that array in a db or text file what is the best practice to keep that arraylist??
I saw some place keep that arraylist in singleton class. How I do that ??
(see full text)
06:10
Hello
posted on January 01, 2016

New Cyanide and Happiness Comic

How can I parse this JSON object that is in an array but has the same name for the other objects in that same array?
@MukeshRana More or less, Yes. :P
@NoughT Yes there is a way, Make a class which will extends Application class. There define two methods one for get and another for set the object arraylist. When you fetch the arraylist in your SplashActivity, you can get that Application reference with SplaceActivity context reference and call that set method and set the arraylist.
I did not get this part ...
"Make a class which will extends Application class"
You mean make a class lke
public class SetStaticArray extend Activity {
}
Application class is nothing but a singleton class which holds Application context reference throughout Application life cycle
No
06:20
AH..
I got that
in the constructor method get the context
public class MyApplication extends Application{
 set(arraylist){}
 get(){return arraylist}
}
@xZ4FiRx What do you mean ?
what about a class like this??
this is a example
@TheLittleNaruto Thank you
Thank you bro
I learn something new in start in the new year
Thank you
@NoughT NP :) A better example is here : androidexample.com/…
06:42
@TheLittleNaruto OK... hws ya now ??
@TheLittleNaruto I mean that I want to parse a particular object property in this array but it's the third object in the array and is where the property I want is so when I use the name since they 're all the same it must think I'm trying use the first object so it doesn't work
@xZ4FiRx Can you show me that json data ?
@xZ4FiRx What particular object property is it ?
@TheLittleNaruto Image url in preview
06:52
@xZ4FiRx Well you can distinguish 'em by their position ?
@TheLittleNaruto How would I do this in Java?
I would use Gson
And create pojo classes for that response
@TheLittleNaruto I working with Android using the volley library
@xZ4FiRx Cool Add Gson as a dependency to your app module first
@TheLittleNaruto Is there a way to do this using Volley? I have code already written I just need to tweak the JsonResponse to get that particular object property.
06:59
@xZ4FiRx Use this: jsonschema2pojo.org
brb
@TheLittleNaruto Thanks
 
3 hours later…
10:05
Hello All,
Can you please check this ?
http://stackoverflow.com/questions/34555101/android-custom-view-attribute-is-not-applied-if-applied-as-theme-style-from-ma
@Zealous What custom attributes do you have ?
@TheLittleNaruto <attr name="customtextColor" format="color"></attr>
@Zealous Well! Why would you make that attribute if there is already one existing ?
Isn't it pointless ? Or I didn't get you.
@TheLittleNaruto Yes it is actually but it is for test purpose only, my question is that if view is affecting if applying style through layout xml file why it is not affecting from Manifest as theme.
10:13
Actually I have one library which is using its own attributes, when I tried to apply those from Manifest as style it was not working so I tried to make one sample test to check this behaviour but it is not working in this simple case also.
Hmm, In that case you're right
It should work.
@Zealous Can you try to test this example : androidcookbook.com/Recipe.seam?recipeId=3307 ?
@TheLittleNaruto Sure, let me check this
meanwhile I'll finish my task.
10:17
ok
It will work because style.xml is using all default attributes (@android....)
10:40
Can anyone help me with websockets?
As my app got hang when i am pulling the data from websocket to listview
Post your issue
@Zealous mmm.. That is true. But I am sure we're something missing there.
@TheLittleNaruto Exactly... just missing some clue here
@PoonamKukreti Well your data might be a lot to pull altogether
10:47
@PoonamKukreti Why setting adapter again in onTextMessage ?
twice in a second i get new data
so only i am binding to refresh
notify adapter instead of assigning it again
11:15
Hi guys.... Whats wrong with this???
(!Phone.matches(("(.*)?/D(.*)")))
Phone is a String.
11:42
@UmerAsif syntax error I cannot even detect that language
@rekire String.matches(regex)
its working now
but am stuck at one thing.
11:56
so this was java?
what is the matter now?
 
2 hours later…
13:36
Merry New Year!
 
2 hours later…
15:10
;)
i was in galaxy , jesus :d
 
3 hours later…
17:50
Ohh Man! I love this song: youtube.com/watch?v=wd4Oxk11PA0
 
5 hours later…
22:26
hello everyone
i need help

« first day (1150 days earlier)      last day (2325 days later) »