Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Miwok app: Cleaning up MediaPlayer resources
/**
* Clean up the media player by releasing its resources.
*/
private void releaseMediaPlayer() {
// If the media player is not null, then it may be currently playing a sound.
if (mMediaPlayer != null) {
// Regardless of the current state of the media player, release its resources
// because we no longer need it.
mMediaPlayer.release();
// Set the media player back to null. For our code, we've decided that
// setting the media player to null is an easy way to tell that the media player
// is not configured to play an audio file at the moment.
mMediaPlayer = null;
}
}
@JonathanSum

This comment has been minimized.

Copy link

@JonathanSum JonathanSum commented Apr 23, 2017

It looks like i am the first here.

@sayansil

This comment has been minimized.

Copy link

@sayansil sayansil commented Apr 24, 2017

But not the only one :-)

@zavex

This comment has been minimized.

Copy link

@zavex zavex commented Apr 29, 2017

Seems im the third one ...

@PascalProgrammingX

This comment has been minimized.

Copy link

@PascalProgrammingX PascalProgrammingX commented Apr 30, 2017

Yeah you are but More still Coming

@pattar420

This comment has been minimized.

Copy link

@pattar420 pattar420 commented May 1, 2017

me too

@SiAust

This comment has been minimized.

Copy link

@SiAust SiAust commented May 2, 2017

Hi gang :)

@gxlinda

This comment has been minimized.

Copy link

@gxlinda gxlinda commented May 5, 2017

Just checking in :)

@vai21

This comment has been minimized.

Copy link

@vai21 vai21 commented May 8, 2017

Hi guys

@versatgrant

This comment has been minimized.

Copy link

@versatgrant versatgrant commented May 10, 2017

And the relay continues

@davidpinto1979

This comment has been minimized.

Copy link

@davidpinto1979 davidpinto1979 commented May 15, 2017

:) Portugal is here :)
Let's clean Media Player, and play Salvador Sobral! ;D

@sojelee

This comment has been minimized.

Copy link

@sojelee sojelee commented May 15, 2017

Hi JonathanSum, you the first in what

@nitin92garg

This comment has been minimized.

Copy link

@nitin92garg nitin92garg commented May 18, 2017

hey me too!

@codewithvikas

This comment has been minimized.

Copy link

@codewithvikas codewithvikas commented May 23, 2017

Least but not last :-)

@BrentWashington

This comment has been minimized.

Copy link

@BrentWashington BrentWashington commented May 23, 2017

How's it going everyone?

@abagithub

This comment has been minimized.

Copy link

@abagithub abagithub commented May 24, 2017

well well well. this moment is part of a history to remember :)

@karkinissan

This comment has been minimized.

Copy link

@karkinissan karkinissan commented May 28, 2017

Commenting for so that I can look back at this years later and experience the nostalgia.

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented May 28, 2017

Hey, me from future, remember how cool was to learn this stuff?

@slxny

This comment has been minimized.

Copy link

@slxny slxny commented May 30, 2017

It seems I am the 18th one

@slxny

This comment has been minimized.

Copy link

@slxny slxny commented May 30, 2017

I don't understand. If it the MediaPlayer is released regardless of the state of the MediaPlayer, ,then won't it release no matter if it's playing an audio file or not?

@00mikhael

This comment has been minimized.

Copy link

@00mikhael 00mikhael commented May 30, 2017

Seems Am 19th

@Jaipee888

This comment has been minimized.

Copy link

@Jaipee888 Jaipee888 commented Jun 3, 2017

Looks like its an elite club. Some of the other folks have dropped out of the course. Crowd is thining out. Good Luck everyone.

@hogie12345

This comment has been minimized.

Copy link

@hogie12345 hogie12345 commented Jun 3, 2017

difficult for me

@rebekaszucs

This comment has been minimized.

Copy link

@rebekaszucs rebekaszucs commented Jun 5, 2017

Hey, happy coding for all of us!

@victorcocuz

This comment has been minimized.

Copy link

@victorcocuz victorcocuz commented Jun 6, 2017

hi guys

@carolmiers

This comment has been minimized.

Copy link

@carolmiers carolmiers commented Jun 6, 2017

Hi guys

@Peter-Wanden

This comment has been minimized.

Copy link

@Peter-Wanden Peter-Wanden commented Jun 7, 2017

Hey, well done to everyone of you for getting this far.....
I've had to go over things a good few times to 'get it'!

@tSquaredd

This comment has been minimized.

Copy link

@tSquaredd tSquaredd commented Jun 8, 2017

derp

@MesyMacos

This comment has been minimized.

Copy link

@MesyMacos MesyMacos commented Jun 12, 2017

Hey guys, anyone else with a fried brain?

@Carlos-Alonzo

This comment has been minimized.

Copy link

@Carlos-Alonzo Carlos-Alonzo commented Jun 13, 2017

Civilian Coders, Hello!! May you enjoy your copy and paste of this code snippet successfully, ciao!!

@SalehAziz1993

This comment has been minimized.

Copy link

@SalehAziz1993 SalehAziz1993 commented Jun 15, 2017

good

@arewindemwe

This comment has been minimized.

Copy link

@arewindemwe arewindemwe commented Jun 19, 2017

It has been a beautiful journey with Android learning from Udacity!! Kudos to the team!

@NicReg

This comment has been minimized.

Copy link

@NicReg NicReg commented Jun 19, 2017

Learning little by little :-)

@emasys

This comment has been minimized.

Copy link

@emasys emasys commented Jun 21, 2017

Clean stuff

@muditsaxena1

This comment has been minimized.

Copy link

@muditsaxena1 muditsaxena1 commented Jun 24, 2017

Hi guys!!

@Manojhaki

This comment has been minimized.

Copy link

@Manojhaki Manojhaki commented Jun 27, 2017

I am keeping Up. YES .

@jupitorapps

This comment has been minimized.

Copy link

@jupitorapps jupitorapps commented Jun 30, 2017

hello guys... how are you doing...?

@Adubiaro

This comment has been minimized.

Copy link

@Adubiaro Adubiaro commented Jul 1, 2017

It's good to be here.. Happy learning folks

@rafaspimenta

This comment has been minimized.

Copy link

@rafaspimenta rafaspimenta commented Jul 3, 2017

No pain, no gain

@wilcoln

This comment has been minimized.

Copy link

@wilcoln wilcoln commented Jul 6, 2017

Seems i'm the 38 coooool!

@RexNx

This comment has been minimized.

Copy link

@RexNx RexNx commented Jul 8, 2017

is good to see than Im not the only one with a fried brain here! 39, lucky number!

@Jonyliang

This comment has been minimized.

Copy link

@Jonyliang Jonyliang commented Jul 10, 2017

the other fried brain is here hands up

@purnasrivatsa96

This comment has been minimized.

Copy link

@purnasrivatsa96 purnasrivatsa96 commented Jul 13, 2017

it looks like i'm the forty first here

@mario-at

This comment has been minimized.

Copy link

@mario-at mario-at commented Jul 13, 2017

but not the last ;)

@mojisol

This comment has been minimized.

Copy link

@mojisol mojisol commented Jul 15, 2017

definitely not the last

@mezubeen

This comment has been minimized.

Copy link

@mezubeen mezubeen commented Jul 15, 2017

I am sure i am not the last one

@ananthrajsingh

This comment has been minimized.

Copy link

@ananthrajsingh ananthrajsingh commented Jul 17, 2017

Why can't we simply release mMediaPlayer without checking for not equals to null? Why an unnecessary If condition?

@ananthrajsingh

This comment has been minimized.

Copy link

@ananthrajsingh ananthrajsingh commented Jul 17, 2017

Tried. The app crashes without the If condition. Releasing already null object might not be Java's cup of tea.

@AlaaAlshorbagy

This comment has been minimized.

Copy link

@AlaaAlshorbagy AlaaAlshorbagy commented Aug 4, 2017

I'm egyptian dragon :D

@Thierry25

This comment has been minimized.

Copy link

@Thierry25 Thierry25 commented Aug 7, 2017

Man I'm sure that I'm the last one! :'(

@ogbeks

This comment has been minimized.

Copy link

@ogbeks ogbeks commented Aug 8, 2017

Not so sure... But I am here...

@TobyTheCoder

This comment has been minimized.

Copy link

@TobyTheCoder TobyTheCoder commented Aug 9, 2017

Is the counting still on?

@JEDiTech

This comment has been minimized.

Copy link

@JEDiTech JEDiTech commented Aug 10, 2017

Oh well you're not you see @Thierry25
What's up house. I think i'm number.......

@lekeOnilude

This comment has been minimized.

Copy link

@lekeOnilude lekeOnilude commented Aug 12, 2017

I'm the last. yes!!!!

@nikhil878

This comment has been minimized.

Copy link

@nikhil878 nikhil878 commented Aug 14, 2017

When we are using This helper method in the Activityclasses, then we are not using any object to call it. How it is possible to call it?

listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
releaseMediaPlayer();//// at this line?
Word word = words.get(i);
Log.v("ColorsActivity","Current Word:"+ word.toString());
mPlayer = MediaPlayer.create(ColorsActivity.this, word.getAudioId());
mPlayer.start();
mPlayer.setOnCompletionListener(mCompletionListener);

@yehee

This comment has been minimized.

Copy link

@yehee yehee commented Aug 14, 2017

It's August 2017 :)

@ShreevaraPunacha

This comment has been minimized.

Copy link

@ShreevaraPunacha ShreevaraPunacha commented Aug 15, 2017

Yes, I am the Last.....

@afraz-afaq

This comment has been minimized.

Copy link

@afraz-afaq afraz-afaq commented Aug 17, 2017

Maybe not

@Presheda

This comment has been minimized.

Copy link

@Presheda Presheda commented Aug 20, 2017

This method can't work for me because the way i implemented my MediaPlayer is different.... Instead of writing onClickListener in every activity, i wrote it only once in my ADAPTER and set it on the listView....

And i also believe the way i did mine is resource friendly because the MEDIAPLAYER is created only when the LISTVIEW is clicked and also destroyed when it finish playing because i did not store it as a global variable.

``package com.example.android.miwok;

import android.app.Activity;
import android.media.MediaPlayer;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.ArrayList;

/**

  • Created by Precious on 8/16/2017.
    */

public class ValueAdapter extends ArrayAdapter {
private int colorResource;

public ValueAdapter(Activity view, ArrayList<ValueHolder> peter, int ColorR){

    super(view, 0, peter );
    colorResource = ColorR;
}


@Override
public View getView(int position,  View convertView, ViewGroup parent) {
    View listView = convertView;
    if(listView == null){
        listView = LayoutInflater.from(getContext()).inflate(R.layout.list_item, parent, false);
    }

    //gets the current position of the wordobject
    final ValueHolder currentOne = getItem(position);

    //find the view by Id and stores it in a variabl
    TextView peter = (TextView) listView.findViewById(R.id.first);


    peter.setText(currentOne.miwokTranslation());

    TextView hope = (TextView) listView.findViewById(R.id.second);
    hope.setText(currentOne.defaultTranslation());

    ImageView honey = (ImageView) listView.findViewById(R.id.item_icon);
    honey.setImageResource(currentOne.getImageResourceId());

    // Set the theme color for the list item
    View textContainer = listView.findViewById(R.id.container);

    //set onClickListener onthe container to play the audio file when clicked
    listView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            MediaPlayer house = MediaPlayer.create(getContext(), currentOne.getSound());
            house.start();
        }
    });

    //Find the color that the resource ID maps to
    int color = ContextCompat.getColor(getContext(), colorResource);
    // Set the background color of the text container View
    textContainer.setBackgroundColor(color);

    listView.setBackgroundColor(color);


    return listView;
}

}
``

@AfreenHasheem

This comment has been minimized.

Copy link

@AfreenHasheem AfreenHasheem commented Aug 24, 2017

I am definitely the last one! Love the way the app is coming through. Thanks Udacity!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Aug 25, 2017

marwadi manus is here

@Qadmi1

This comment has been minimized.

Copy link

@Qadmi1 Qadmi1 commented Aug 29, 2017

nope I'm the last one!

@almiavicas

This comment has been minimized.

Copy link

@almiavicas almiavicas commented Sep 2, 2017

Ahaha! Now I'm the Last of Us

@pramodsravan

This comment has been minimized.

Copy link

@pramodsravan pramodsravan commented Sep 5, 2017

More and more snowflakes! How's it going?
Its September 2017 and winter is coming ;)

@faisalsash

This comment has been minimized.

Copy link

@faisalsash faisalsash commented Sep 6, 2017

then lets code in a hot way to make winter warm! By the way thumps up for udacity for this course, being coding in java for a while now but going through android gives me a whole new reasonable perspective.

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Sep 13, 2017

...and the legacy of new developers continues to grow.

@imCleaf

This comment has been minimized.

Copy link

@imCleaf imCleaf commented Sep 27, 2017

You can still make this method in a class and import it. Use the method whenever you need .

@diegosawa

This comment has been minimized.

Copy link

@diegosawa diegosawa commented Oct 14, 2017

happy to join the line

@ausaleh

This comment has been minimized.

Copy link

@ausaleh ausaleh commented Oct 29, 2017

looks like i came in late

@5AbhishekSaxena

This comment has been minimized.

Copy link

@5AbhishekSaxena 5AbhishekSaxena commented Oct 29, 2017

I'm too late, i guess :P

@buniumasta

This comment has been minimized.

Copy link

@buniumasta buniumasta commented Nov 2, 2017

I hope I am not the last one ;).

@AhmedHamdyYassin12

This comment has been minimized.

Copy link

@AhmedHamdyYassin12 AhmedHamdyYassin12 commented Nov 6, 2017

temporary last hahaha

@pr124

This comment has been minimized.

Copy link

@pr124 pr124 commented Nov 15, 2017

Knock knock

@marcinj95

This comment has been minimized.

Copy link

@marcinj95 marcinj95 commented Nov 23, 2017

@Presheda
I totally agree with u !

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Nov 29, 2017

Hi there !

@kayveen

This comment has been minimized.

Copy link

@kayveen kayveen commented Dec 14, 2017

This is hard but interesting ... I started this course at 8 Am and i'm already here and it's 7 pm

@Mungoi

This comment has been minimized.

Copy link

@Mungoi Mungoi commented Dec 17, 2017

hello fellow programmers

@ganemcos

This comment has been minimized.

Copy link

@ganemcos ganemcos commented Dec 24, 2017

The course is Awesome really the day to remember

@sankalpdayal5

This comment has been minimized.

Copy link

@sankalpdayal5 sankalpdayal5 commented Jan 13, 2018

not working for me.

@abdelkarim22

This comment has been minimized.

Copy link

@abdelkarim22 abdelkarim22 commented Jan 15, 2018

the last one here should be me haha
I am thanking udacity and course team for this amazing experience

@ShubhamGuptaTheOriginal

This comment has been minimized.

Copy link

@ShubhamGuptaTheOriginal ShubhamGuptaTheOriginal commented Jan 18, 2018

Or Bhadwon!!! Kaise ho?

@DanielKanyingi

This comment has been minimized.

Copy link

@DanielKanyingi DanielKanyingi commented Jan 22, 2018

I am the last one here....its getting interesting and challenging.

@areeta

This comment has been minimized.

Copy link

@areeta areeta commented Jan 22, 2018

Are you sure you're the last one?

@luciotorelli

This comment has been minimized.

Copy link

@luciotorelli luciotorelli commented Jan 23, 2018

Not the first and perhaps not the last one =p

@karimamd

This comment has been minimized.

Copy link

@karimamd karimamd commented Jan 26, 2018

how about leaving the commenting area for those who have questions xD

@adilsachwani

This comment has been minimized.

Copy link

@adilsachwani adilsachwani commented Jan 28, 2018

Udacity is love. <3

@AliRadwan

This comment has been minimized.

Copy link

@AliRadwan AliRadwan commented Feb 4, 2018

cool

@SanchitB23

This comment has been minimized.

Copy link

@SanchitB23 SanchitB23 commented Feb 17, 2018

Seems like everybody is leaving a mark. ;)

@nassimguenez

This comment has been minimized.

Copy link

@nassimguenez nassimguenez commented Feb 23, 2018

سلام!

@geo600

This comment has been minimized.

Copy link

@geo600 geo600 commented Feb 23, 2018

Hello

@jballi17

This comment has been minimized.

Copy link

@jballi17 jballi17 commented Feb 26, 2018

Happy coding everyone! keep up the hard work!

@Mzsd

This comment has been minimized.

Copy link

@Mzsd Mzsd commented Mar 5, 2018

My humble beginning!

@spi-ros

This comment has been minimized.

Copy link

@spi-ros spi-ros commented Mar 9, 2018

Lol I'm here too..

@flashfireflash

This comment has been minimized.

Copy link

@flashfireflash flashfireflash commented Mar 10, 2018

nice app....nice course

@mamdogogo

This comment has been minimized.

Copy link

@mamdogogo mamdogogo commented Mar 13, 2018

you will never code alone
hhehe

@usamas2

This comment has been minimized.

Copy link

@usamas2 usamas2 commented Mar 17, 2018

working !
زي الفل 👍

@Pawantech

This comment has been minimized.

Copy link

@Pawantech Pawantech commented Mar 17, 2018

i love this stuff....

@lakhdartn

This comment has been minimized.

Copy link

@lakhdartn lakhdartn commented Mar 17, 2018

1MAC participant was here

@badrddinb

This comment has been minimized.

Copy link

@badrddinb badrddinb commented Mar 19, 2018

Thanks

@angwandi

This comment has been minimized.

Copy link

@angwandi angwandi commented Mar 23, 2018

2ms Was here

@louayeldin

This comment has been minimized.

Copy link

@louayeldin louayeldin commented Mar 25, 2018

Awesome

@sherifhisham

This comment has been minimized.

Copy link

@sherifhisham sherifhisham commented Mar 25, 2018

nice work

@superskiers

This comment has been minimized.

Copy link

@superskiers superskiers commented Mar 29, 2018

yes

@bytao7mao

This comment has been minimized.

Copy link

@bytao7mao bytao7mao commented Apr 2, 2018

hi there

@shadabumer

This comment has been minimized.

Copy link

@shadabumer shadabumer commented Apr 8, 2018

Hey Everyone, happy learning

@yufengy

This comment has been minimized.

Copy link

@yufengy yufengy commented Apr 9, 2018

Last one here, temporarily.

@doilio

This comment has been minimized.

Copy link

@doilio doilio commented Apr 12, 2018

I'm The Last One... Sorry Yufengy 😆

@doilio

This comment has been minimized.

Copy link

@doilio doilio commented Apr 12, 2018

Before i had implemented the method to clean up Media Resources, i could only listen to the audio 27 times before the audio completely stopped. I had to close the app, and start it again so that the views would emit sounds as they were clicked...
But now it's all cool 😃 👍

@hamza28

This comment has been minimized.

Copy link

@hamza28 hamza28 commented Apr 13, 2018

hi

@Sara85Alk

This comment has been minimized.

Copy link

@Sara85Alk Sara85Alk commented Apr 17, 2018

Awesome course and Awesome community

@YounghwanYoon

This comment has been minimized.

Copy link

@YounghwanYoon YounghwanYoon commented Apr 26, 2018

WootWooT~!

@monsur4

This comment has been minimized.

Copy link

@monsur4 monsur4 commented Apr 28, 2018

This is nice. Gracias udacity

@ID2GO

This comment has been minimized.

Copy link

@ID2GO ID2GO commented Apr 30, 2018

Here is my own adaptation of the MiwokApp. I call it Dictionary 2 Go as I have plans for further use of this app as simple dictionary for friends working among African peoples groups with low litteray rates.
You could take a look at the Master Branch but I recommend you to look at the integrating fragments branch.
Feel free to work with it, and implement ideas if you like them, but please do not just copy & paste it all without learning.
Take note, that though my app looks & works exactly the same as the Miwok app, In it's core it is a bit different as I have integrated all code into a centralized working code in stead of the decentralized approach that we were taught.
https://github.com/ID2GO/Dictionary2GO.git

@yucoz

This comment has been minimized.

Copy link

@yucoz yucoz commented May 17, 2018

JonathanSum you are the first here but the most exciting one will be the last one ?! and why he/she will be the last one? and approximately when? At the end of the world ? :D
I hope so not i am :D

@pinedalezephyr

This comment has been minimized.

Copy link

@pinedalezephyr pinedalezephyr commented May 18, 2018

Guys I started on this class back in March, just was not worried about placement on this thread. Have fun.

@shafiqahmad786

This comment has been minimized.

Copy link

@shafiqahmad786 shafiqahmad786 commented May 27, 2018

Good to see all of you guys.

@VasilisPlavos

This comment has been minimized.

Copy link

@VasilisPlavos VasilisPlavos commented Jun 4, 2018

I think I am the last one... 😅

@bedo2030

This comment has been minimized.

Copy link

@bedo2030 bedo2030 commented Jun 7, 2018

no, you aren't the last one ... there are more coming @PlavosVasilis 😄

@moodysache

This comment has been minimized.

Copy link

@moodysache moodysache commented Jun 8, 2018

Am I the last one? :D

@alexznumber1

This comment has been minimized.

Copy link

@alexznumber1 alexznumber1 commented Jun 9, 2018

Really guys?

@khalidCoding

This comment has been minimized.

Copy link

@khalidCoding khalidCoding commented Jun 14, 2018

6/14/2018 ?

@mhuaco

This comment has been minimized.

Copy link

@mhuaco mhuaco commented Jun 24, 2018

Staying focused.

@Kkareem

This comment has been minimized.

Copy link

@Kkareem Kkareem commented Jun 26, 2018

26/06/2018

@hossamsalah1974

This comment has been minimized.

Copy link

@hossamsalah1974 hossamsalah1974 commented Jun 26, 2018

i am here too

@biddlecom

This comment has been minimized.

Copy link

@biddlecom biddlecom commented Jun 27, 2018

currently in last position.... me =( LOL!

@rami-alloush

This comment has been minimized.

Copy link

@rami-alloush rami-alloush commented Jun 29, 2018

Not anymore @biddlecom 💃

@rami-alloush

This comment has been minimized.

Copy link

@rami-alloush rami-alloush commented Jun 29, 2018

I still can't understand the use of the helper method.
I can just call mMediaPlayer.release();!

@MohRaouf

This comment has been minimized.

Copy link

@MohRaouf MohRaouf commented Jul 10, 2018

Egypt is here :D

@mughalmuneeb786

This comment has been minimized.

Copy link

@mughalmuneeb786 mughalmuneeb786 commented Jul 15, 2018

Pakistani Here :)

@singulardecoy

This comment has been minimized.

Copy link

@singulardecoy singulardecoy commented Jul 15, 2018

Finally, I'm here.certainly not the last one.

@bharatmk256

This comment has been minimized.

Copy link

@bharatmk256 bharatmk256 commented Jul 18, 2018

OK So Now I Am Last One 😁

@Cfoulcard

This comment has been minimized.

Copy link

@Cfoulcard Cfoulcard commented Jul 20, 2018

When I came home there was a man in my house! HE HAD A MECHANICAL ARM!

@jwambuindungu

This comment has been minimized.

Copy link

@jwambuindungu jwambuindungu commented Jul 25, 2018

Kenya is also represented. Lets Learn together.

@WeirdCircumstances

This comment has been minimized.

Copy link

@WeirdCircumstances WeirdCircumstances commented Aug 4, 2018

Happy learning all together :)

@Coderrer

This comment has been minimized.

Copy link

@Coderrer Coderrer commented Aug 8, 2018

South Africa in the house! Hi guys.

@ithustle

This comment has been minimized.

Copy link

@ithustle ithustle commented Aug 13, 2018

Angola in the building, guys!!

@arifikhsan

This comment has been minimized.

Copy link

@arifikhsan arifikhsan commented Sep 2, 2018

am i the last one?

@khurambashir

This comment has been minimized.

Copy link

@khurambashir khurambashir commented Sep 3, 2018

No here is the last one

@slic-rick

This comment has been minimized.

Copy link

@slic-rick slic-rick commented Sep 4, 2018

You wrong about that am the last one

@khurambashir

This comment has been minimized.

Copy link

@khurambashir khurambashir commented Sep 5, 2018

Record of being last....not so proud of

@Aayesha-Raje

This comment has been minimized.

Copy link

@Aayesha-Raje Aayesha-Raje commented Sep 13, 2018

here i am may be the last one :-)

@lundih

This comment has been minimized.

Copy link

@lundih lundih commented Sep 15, 2018

Nope, you ain't the last one...

@prinxcharles

This comment has been minimized.

Copy link

@prinxcharles prinxcharles commented Sep 15, 2018

Prinxcharles was here. Fav this. Y'all would reference this in the near future

@trustidkid

This comment has been minimized.

Copy link

@trustidkid trustidkid commented Sep 21, 2018

I cannot be the last here. I believe

@daly2180

This comment has been minimized.

Copy link

@daly2180 daly2180 commented Sep 27, 2018

i'm here too t think i'm the last one here

@briang7

This comment has been minimized.

Copy link

@briang7 briang7 commented Oct 2, 2018

They call me Dragon Rider......................Roar lol

@moiyd

This comment has been minimized.

Copy link

@moiyd moiyd commented Oct 5, 2018

was here, maybe a bit late but I am catching up with the train :P ;-)

@dacruzl2

This comment has been minimized.

Copy link

@dacruzl2 dacruzl2 commented Oct 19, 2018

Im last see this method ;)

@JuanByte

This comment has been minimized.

Copy link

@JuanByte JuanByte commented Oct 24, 2018

I'm just gonna write that none of the comments before has something to do with the subject.

@tempekrpk

This comment has been minimized.

Copy link

@tempekrpk tempekrpk commented Oct 29, 2018

Person below me, I know you want to post comment as well.
Stop

@ShoaibMirzaa

This comment has been minimized.

Copy link

@ShoaibMirzaa ShoaibMirzaa commented Nov 1, 2018

Lets make a group, learn together and solve each other problems.I don't really understand the helper method.
I'm last though ;)

@Bashnet

This comment has been minimized.

Copy link

@Bashnet Bashnet commented Nov 1, 2018

YOU THOUGHT I WAS THE LAST ONE, BUT IT WAS ACTUALLY ME, DIO!!!!!

@Elieke

This comment has been minimized.

Copy link

@Elieke Elieke commented Nov 20, 2018

i hate udacity!!

@mohammad747

This comment has been minimized.

Copy link

@mohammad747 mohammad747 commented Nov 30, 2018

And I'm the last one ;)

@WAR10RD

This comment has been minimized.

Copy link

@WAR10RD WAR10RD commented Dec 4, 2018

Nope !!! People still coming!!

@Nitinpal07

This comment has been minimized.

Copy link

@Nitinpal07 Nitinpal07 commented Dec 15, 2018

WINTER IS ALMOST HERE.ONLY THE HARDEST WORKERS IN THE ROOM WILL SURVIVE.
HAPPY LEARNING! EVERYONE........

@whilson03

This comment has been minimized.

Copy link

@whilson03 whilson03 commented Dec 16, 2018

really helpful, loving android

@micheldrescher

This comment has been minimized.

Copy link

@micheldrescher micheldrescher commented Dec 30, 2018

Neither the gist nor alternative solutions are thread-safe or resource friendly and are resource hogs, for the following reasons - at least on Android Oreo (i.e. 8.x), might be different on earlier versions!

  1. MediaPlayer is entirely multithreaded, i.e. several MediaPlayer instances are perfectly happy to run in parallel and play audio and video in parallel.
  2. Every time a user clicks on a list item, a java Thread enters the onItemClick() method. That means that, with the way Java Multithreading works, there may well be several Threads executing the same method at the same time, at different lines of code each. And it is not guaranteed that all Threads execute orderly one after the other or even in line through the same method, and any of the called methods such as releaseMediaPlayer().
  3. Therefore, relying on the variable mMediaPlayer to be null or not is, frankly speaking, bollocks, because that way your code will almost certainly miss a number of MediaPlayer instances later in the course when you try to implement the Activity lifecycle methods with the goal of cleaning up the MediaPlayer (I will not spoil the fun by telling which method(s) you need to implement)

There are several ways to solve this problem, but that is a topic for advanced Java Programming (not only Android).

@trayambakkumar

This comment has been minimized.

Copy link

@trayambakkumar trayambakkumar commented Mar 10, 2019

Seems like I'm late

@sofianezerrouki

This comment has been minimized.

Copy link

@sofianezerrouki sofianezerrouki commented Mar 26, 2019

Good job !

@santosh565

This comment has been minimized.

Copy link

@santosh565 santosh565 commented Apr 17, 2019

following me ?? anyone?

@thanhlam1998

This comment has been minimized.

Copy link

@thanhlam1998 thanhlam1998 commented May 10, 2019

I'm here with you

@iver23

This comment has been minimized.

Copy link

@iver23 iver23 commented May 13, 2019

Glad that i'm not the only one in 2019

@nelsola

This comment has been minimized.

Copy link

@nelsola nelsola commented May 21, 2019

Its nice to see that a lot of people have been here, this app has come a long way and i've learnt a lot.

@miladtat

This comment has been minimized.

Copy link

@miladtat miladtat commented May 31, 2019

Hello World!!!!!

@ankyb

This comment has been minimized.

Copy link

@ankyb ankyb commented Jun 5, 2019

I guess I am the first one today :-)

@SupiciousLookingPlant

This comment has been minimized.

Copy link

@SupiciousLookingPlant SupiciousLookingPlant commented Jun 8, 2019

And I think I'm first today, time will tell if I'm the one

@MV1998

This comment has been minimized.

Copy link

@MV1998 MV1998 commented Jun 9, 2019

i think i am last one

@DibasDauliya

This comment has been minimized.

Copy link

@DibasDauliya DibasDauliya commented Jun 11, 2019

can any one help me to add "next, prev, share, download" button below images? @MV1998 @micheldrescher @SupiciousLookingPlant ....

@RemonShehata

This comment has been minimized.

Copy link

@RemonShehata RemonShehata commented Jun 12, 2019

can any one help me to add "next, prev, share, download" button below images? @MV1998 @micheldrescher @SupiciousLookingPlant ....

Hello there, can you show a picture of the design you want? and I would suggest that you use constraints layout

@DibasDauliya

This comment has been minimized.

Copy link

@DibasDauliya DibasDauliya commented Jun 12, 2019

can any one help me to add "next, prev, share, download" button below images? @MV1998 @micheldrescher @SupiciousLookingPlant ....

Hello there, can you show a picture of the design you want? and I would suggest that you use constraints layout

@RemonShehata I have put picture in this google drive "https://drive.google.com/open?id=19BQSLyVhd0P9cbEHq5zI4RwrtKAiI-y2". Please help me, I'm stuck in this since many days :-(. I want to add 1000 of images in this way as shown in figure. Please link me a code or advise me step-by-step please. I'll always pray for you :-)

@RemonShehata

This comment has been minimized.

Copy link

@RemonShehata RemonShehata commented Jun 13, 2019

can any one help me to add "next, prev, share, download" button below images? @MV1998 @micheldrescher @SupiciousLookingPlant ....

Hello there, can you show a picture of the design you want? and I would suggest that you use constraints layout

@RemonShehata I have put picture in this google drive "https://drive.google.com/open?id=19BQSLyVhd0P9cbEHq5zI4RwrtKAiI-y2". Please help me, I'm stuck in this since many days :-(. I want to add 1000 of images in this way as shown in figure. Please link me a code or advise me step-by-step please. I'll always pray for you :-)

One way of doing this could be that you use a relative layout as the parent view and use linear layout for the buttons with orientation horizontal

@DibasDauliya

This comment has been minimized.

Copy link

@DibasDauliya DibasDauliya commented Jun 13, 2019

can any one help me to add "next, prev, share, download" button below images? @MV1998 @micheldrescher @SupiciousLookingPlant ....

Hello there, can you show a picture of the design you want? and I would suggest that you use constraints layout

@RemonShehata I have put picture in this google drive "https://drive.google.com/open?id=19BQSLyVhd0P9cbEHq5zI4RwrtKAiI-y2". Please help me, I'm stuck in this since many days :-(. I want to add 1000 of images in this way as shown in figure. Please link me a code or advise me step-by-step please. I'll always pray for you :-)

One way of doing this could be that you use a relative layout as the parent view and use linear layout for the buttons with orientation horizontal

Thank you @RamonShehata, and please also say about code in Activity? please?

@DibasDauliya

This comment has been minimized.

Copy link

@DibasDauliya DibasDauliya commented Jun 16, 2019

I want to make list of miwok app click and transfer to another activity. how can i do that please help me. for eg. if i click "one, luti" i should go to another activity. please help me @RamonShehata @ @MV1998 @micheldrescher @SupiciousLookingPlant @sofianezerrouki @mohammad747 , @ anyone who know??

@Parth-Bhanushali

This comment has been minimized.

Copy link

@Parth-Bhanushali Parth-Bhanushali commented Jul 12, 2019

Leaving this comment so i can remember those days in future when I would become something like professional and will look back how hard the days were 😄

@FatimaBaballa

This comment has been minimized.

Copy link

@FatimaBaballa FatimaBaballa commented Aug 17, 2019

السلام عليكم
Al Salam Alikom
Peace to all of you and to me in the future

@fathy3

This comment has been minimized.

Copy link

@fathy3 fathy3 commented Sep 2, 2019

print("python must be main for Android")

@kumarlava0007

This comment has been minimized.

Copy link

@kumarlava0007 kumarlava0007 commented Sep 29, 2019

And I'm last now.

@escuSerban

This comment has been minimized.

Copy link

@escuSerban escuSerban commented Oct 27, 2019

And I'm last now.

I won't bet on that mate 🔢

@waseemminhas

This comment has been minimized.

Copy link

@waseemminhas waseemminhas commented Dec 16, 2019

Am I late?

@RezaParivar

This comment has been minimized.

Copy link

@RezaParivar RezaParivar commented Dec 17, 2019

Am I late?

yes u r

@rajhritik

This comment has been minimized.

Copy link

@rajhritik rajhritik commented Dec 29, 2019

Wishing you A Happy 2020!!
Most of the crowd has left the chatroom!!

@utsavkc24

This comment has been minimized.

Copy link

@utsavkc24 utsavkc24 commented Jan 16, 2020

Looks like I'm the newest one

@nghiemson

This comment has been minimized.

Copy link

@nghiemson nghiemson commented Jan 20, 2020

Hello guys

@C-ArenA

This comment has been minimized.

Copy link

@C-ArenA C-ArenA commented Feb 28, 2020

Vi un comentario en árabe por acá. ¿Primer comentario en español? Qué tal cuates.
First comment in Spanish.

@MohamedAlramly

This comment has been minimized.

Copy link

@MohamedAlramly MohamedAlramly commented Mar 16, 2020

I am the last one now

@okpalaChidiebere