« first day (899 days earlier)      last day (2576 days later) » 

5:03 AM
posted on April 25, 2015

New Cyanide and Happiness Comic

 
5:14 AM
Good Morning Guys
 
mrng.. :)
 
Saturday Funks ;)
 
hehe
2mrw i was looking for a volley user
 
Volley user ? Why ?
 
mean to say one who uses volley as a networking library. Actually i need to ask is there any official gradle dependency available for volley??
 
5:20 AM
I guess, NO.
I am the Volley user.
I use jar only
 
okay okay.. so does that jar supports sending multipart data to server?
 
so i think the jar you are using is not the official one, bcoz as far as i know official volley doesn't have this feature
and yeah i heard of volley plus too
 
The only way is to make custom Request class
No I am using the official one only.
What I shared is, how you can make a custom Request class.
for multipart support
 
okay okay.. well let me clear official volley doesn't support multipart data.. right??
 
5:26 AM
As far as you don't have that custom Request class.
 
okay okay
 
berserk doesn't come today ?
 
so i think instead of using volleyplus we can add the official volley as a module dependency and customize it acccording to our needs
umm.. not yet
 
I don't think we have volley's dependency, or do we have ?
@MukeshRana If it is just multipart part, then use official one. and make only one custom class.
Volley is far better than Picasso on loading multiple images.
So, it is another advantage
 
i was talking about module depedency i.e downloading the library from github and using it as an module in our project
 
5:31 AM
One guy helped you for that : stackoverflow.com/a/16803473/1944896
@MukeshRana Sorry, I misread.
 
@TheLittleNaruto yeah but i haven't practically found any much difference regarding image loading using volley and picasso
but theoretically volley wins the race
 
What I told, is on the basis of practical experiments that me and my colleague has done on both of 'em.
 
Actually the problem with volley is it is not customizable as we developers expect from it
 
In what way ?
 
Like suppose i need circular image then in that case we have to use hacks
 
5:34 AM
Hacks ??
You can find CircularImageView.java from github. Many are there.
And loading image on that is easy by Volley
All we need an instance of ImageLoader.
 
that CircularImageView and RoundedNetworkImageView i considered them basically hacks because they are not avaialable in official volley i think
plus in volley you can't load images from gallery as well
 
yolo
They removed from maps
 
NetworkImageView is nothing but a ImageView
 
The android and apple icon
 
5:38 AM
You can load Galley Images
@berserk Yo
 
ouch that ping!
 
100 volume on headphones
But it was refreshing.
Like we hit f5 to refresh PC :P
 
If it is not NetworkImageView, It is still easy to load an Image on any other ImageView or CircularImageView via Volley.
 
@TheLittleNaruto I don't know if they have improved now but when i was using volley at its best, these issues were totally annoying
@TheLittleNaruto so mean to say creating bitmaps and then setting it to imageview
 
5:41 AM
See for example:
 
but afaik Volley's NetworkImageView is best in performance
 
 ImageLoader mImageLoader = MyVolleySingleton.getInstance(getActivity()).getImageLoader();
                mImageLoader.get("PROFILE_PIC_URL", ImageLoader.getImageListener(imgView,
                        R.drawable.img_placeholder, R.drawable.img_placeholder));
@MukeshRana Boy! Because it uses Volley's callbackes and instances of Image Loading functionality.
 
Hello folks
 
Hey folk
 
Hey Robin bro
 
5:44 AM
no weekend? :P
 
@MukeshRana That example is in case of you're having ImageView/CircularImageView, not NetworkImageview
 
Hello pandey saab
@TheLittleNaruto yeah that i know and have used number of times
 
Great!
Then why do you have still doubts ?
 
@MukeshRana yes munawwar rana
 
@TheLittleNaruto i was saying suppose if i don't want to use CircularImageView, in that case i have to make bitmap to get it cropped
 
5:47 AM
Can I exclude tablet to install my application?
 
yea
 
@MukeshRana Yes.. So ?
 
@RobinHood sup?
 
@berserk way?
 
@TheLittleNaruto so don't you think in that case there may be chances of OOM errors since we have to deal with bitmaps and also i have found that when we try to load bitmap using volley it blocks the UI thread for a second and there may be a chance that it doesn't load it at once
 
5:49 AM
@RobinHood Googling :P
 
Apart from doing manually
 
Well, you can set screen sizes which you want to support inside manifest.
15
Q: Make android app not availble for tablets

aveschiniI am publishing my app in the Play store and i don't want it to be available for tablets. How can i make it happen? I don't want to manually exclude every single tablet within the developer console of android but i really need my application to run exclusively on smartphone. EDIT: I did as you...

 
A tablet is a normal Android device, it'll run the same software.
 
@MukeshRana That is why we have many library out there to crop an image. You can't get everything from Network Library :-)
 
@TheLittleNaruto but picasso, UIL and many other image loading libraries provide us with this customization alteast a circular one
 
5:51 AM
@RobinHood But still, it is different coz of its physical size.
 
@MukeshRana with picasso, UIL , can we make web services APIs call ?
Those are for images. They have specific purpose. So they're intended to handle almost everything for processing images.
@RobinHood Is your app on Play store ?
 
@TheLittleNaruto so what's the use of Volley if we have to use external libraries to customize it. Don't you think it's one and the same thing if i am using a combination of networking and image loading library or simply volley with other libraries that are required for customization
 
@TheLittleNaruto ya
 
Somebody give me a gun, and make sure it is loaded with bullets.
 
:D
 
5:56 AM
@RobinHood You can choose devices on play store console on only those devises the app will be installed.
 
@berserk what about large and xlarge?
 
@RobinHood what?
 
@TheLittleNaruto ya that door is open but I 'm trying to achieve problematically instead
 
@berserk Thanks :) Now @MukeshRana Do you have any other question ?
 
well i think its enough for today :P
 
5:57 AM
@RobinHood Okay you can follow berserk then. :)
@MukeshRana Well! you're a smart boy. :-)
 
so let's talk about some material design now ;)
 
haha
Sure
 
@berserk meant, what about xxhdpi and xxxhdpi?
 
@Muk You're a question bank just like Erum. Only difference is she asks without doing RnD and you ask ignoring RnD.
 
lol
Man, you spark the war :P
 
6:00 AM
haha
No, He is a smart boy. :-)
 
who? me? ooh thanks ;)
 
@TheLittleNaruto lol.. when i ask a question I know about the alternates the only thing i need to confirm is the bestest solution and what other developers are using for that
 
@MukeshRana I know. Can't I kid ?
 
@RobinHood I didn't meant by pixel density
I meant by actual physical size.
 
6:02 AM
@TheLittleNaruto hehe.. yeah you can after all you are a baby
 
hi i have one problem in fragment.
 
@MukeshRana heh! Smart boy, I must say. Because if you were to say, I can't kid. I could have bring my gun and dhichkyaun.... :P
@RamMansawala What is it ?
 
To quote Caution: Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with a screen configuration that you have not listed. You should use it only as a last resort from Developer's SDKt0mm13b Jan 23 '13 at 19:30
 
@TheLittleNaruto in my application, i have two fragment, fragment1 and fragment2. i run my application, and go to fragment2 and enter some values and click on submit button. and call fragment1. in fragment1 i want to set this updated values onto textview.
 
@RamMansawala How do you call fragment1 when you press submit button ?
 
6:06 AM
@TheLittleNaruto ((HomeActivity) getActivity()).nonSwipeHomeViewPager.setCurrentItem(6, true);
this viewpager and one main fragment activity within int i use fragments.
 
@RamMansawala And how does setCurrentItem function operate ?
 
6 stands for fragment1. i have newInstance() in fragment1.
@TheLittleNaruto also i use super.setUserVisibleHint(isVisibleToUser); in fragmemt1.
 
I would say make a different function which will have some parameters whichever you need to pass to fragment1 via fragment2. In that function Bundle all parameters and pass to the fragment1. And in fragment1 you can check if bundle is not null get the values and show on textview.
 
@berserk for a testing I have to publish new apk?
 
means whenever user open fragment1 he/she gets updates values. i tried to set text in setUserVisibleHint(boolean isVisibleToUser){
//code}
 
because via editor it get install in tablet
 
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
 
but application gets crash.
 
I guess we have to include xxhdpi and xxxhdpi too
 
23
A: Android - Google Play filtering out xxhdpi

NiThDiI found the solution: Instead of adding the <screen android:screenDensity="xxhdpi" android:screenSize="normal"/> line to the compatible-screens section, it seems like the numeric value is working as well: <screen android:screenDensity="480" android:screenSize="normal"/>

 
6:13 AM
@RobinHood Can I see your manifest? Have you used support screens?
@RobinHood lol that green troll icon
 
:D
not used support only applied compatible-screens tag
 
And it is running on tablet?
So, it is for filtering only in Play store.
 
The Android system does not read the <compatible-screens> manifest element (neither at install-time nor at runtime). This element is informational only and may be used by external services (such as Google Play)
 
@MukeshRana Your tween brother:
 
@TheLittleNaruto lol
 
6:16 AM
Only difference is he looks more cruel!
 
but i have got innocent face :P
 
haha, not on SO
 
lol.. am just smiling in my dp. doesn't it look so
 
@TheLittleNaruto how to pass bundle with arguments from fragment1 to fragment2?
 
6:17 AM
@RobinHood Hmm. Then it is impossible programetically.
Only we can add tags so that Google filters it out.
 
@RamMansawala via setArguments
 
Bundle b = new Bundle();

fragment.setArguments(b);
is this right?
 
Of course
 
but i want to pass those values to another fragment?
 
make sure you have passed the data as well
 
6:20 AM
@RobinHood what about adding a permission in manifest that tabs generally don't support, it will then automatically filter out by google like you can add call permission in your manifest. but try this only after if all the avaialable solutions are not working
 
before passing it to setArguments
 
@TheLittleNaruto i don't know how to pass data with bundle
 
:22920449 Bundle b = new Bundle();
b.putString("MY_TEXT", value);
fragment.setArguments(b);
 
okay wait i'll try
 
@RamMansawala It is same as you pass via Intent
 
6:22 AM
Hi
 
I have small issue with date manipulation
Date taskEndDate = new Date(2015, 04, 25);
Date systemDate = new Date(2015, 04, 27);
diffInDays = (int) (Math.abs(taskEndDate.getTime() - systemDate.getTime())/ (1000*60*60*24));
 
I am supposed to get the value as 2 in diffInDays variable
but I get absurd results
6 digit numbers
where I am wrong
 
@TheLittleNaruto ?
 
6:24 AM
@JavaEnthusiast use joda time lib
 
I am using it in an android app
I would like to do it without external jars @Rahul
 
@TheLittleNaruto okay! same bundle b = new bundle() i have written in another fragment.
 
@JavaEnthusiast I am getting 2 only.
 
then what i suppose to do is b.getString("KEY"); is it right ? wherei can set this value? i mean onCreateView or setUserVisibleHint?
 
@berserk Most Talkative!
@RamMansawala No
 
6:27 AM
yea, babies talk a lot :P
 
@JavaEnthusiast am also getting 2
 
@RamMansawala Use getArguments().getString("MY_TEXT");
 
@TheLittleNaruto then?
@TheLittleNaruto okay
 
But my android logcat generates some wrong results :(
 
6:29 AM
@JavaEnthusiast And result ^
@JavaEnthusiast Ohh! So it's Android.
 
Ya I also got two in my java code
ya just a second
04-25 06:18:25.519 1968-1968/com.mytasks D/taskDate﹕ 1429920000000
04-25 06:18:25.519 1968-1968/com.mytasks D/taskEndDate﹕ 1430438400000
04-25 06:18:25.520 1968-1968/com.mytasks D/diffInDays﹕ 693985
That part of the code looks like this:
       SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date taskDate = dateFormat.parse(listItem[position].date);
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(taskDate);
        calendar.add(Calendar.DATE, time);
        Date taskEndDate = calendar.getTime();
        Date systemDate  = new Date(2015, 04, 27);
        diffInDays = (int) (Math.abs(taskEndDate.getTime() - systemDate.getTime())/ (1000*60*60*24));
 
Hey! Hey!
Use pastie site please
 
@TheLittleNaruto what happened?
Sorry
:(
 
Don't pase long code here, use paste.ofcode.com. paste code there and share url over here. :-)
 
6:32 AM
You're a smart boy just like Mukesh
 
ha ha thanks ;)
so where I am wrong :(
 
lol
 
@JavaEnthusiast See, I would say use some library like Joda Time instead of relaying on existing Date handling APIs of Android.
 
ok . Let me try that
 
Sure
BTW where are you from ?
 
6:35 AM
India
 
Where in India ?
I am from Canada. :-)
 
Pondicherry. But I know Hindi
 
But don't speak in other language over here other than English. :-)
 
ha ha ok :)
 
And I am from Mars. ^^
 
6:37 AM
But it seems Joda is slow?
Just googled out
 
I dint RnD on its performance time.
 
@TheLittleNaruto It's showering here in Texas :P
 
lol
 
8:01 AM
hey @Katherina hw are you ?
 
8:13 AM
Alright! Time to have lunch!
brb after half an hour. :D
 
user4433485
@Rahul I am alright thanks for asking :p but I have to go actually, need to pick up my friend and then we go to berlin
 
user4433485
I don't know how to come there tho
 
user4433485
I figure it out:p cya later <3
 
8:39 AM
Yay! Finally! Berlin! @Katherina
 
 
9 hours later…
5:15 PM
@MukeshRana no, not permanently. I'll be working on part-time android projects. In company, I don't know about what future has for me.
 
5:35 PM
helloo active android java era chatters
 
hello
 
 
2 hours later…
7:16 PM
Just dropping that link. I think so too!
 

« first day (899 days earlier)      last day (2576 days later) »