How to Make Android Apps 15

[ad_1]
Get the Code Here :

Web Services Tutorial :

How to Make Android Apps 14 :

In this video I’ll take the Android Translation app I made in part 14 and now get it to parse XML data. I’m also going to add the ability to provide XML from the web service I made in part 5 of my web services tutorial.

This is an example of the techniques I use to make a professional app. We need to use multiple languages like Java, PHP and MySQL.


Posted

in

by

Tags:

Comments

17 responses to “How to Make Android Apps 15”

  1. edgar enrique jimenez garcia Avatar

    Hi derek I have problem whit all the import of org.apache, the android studio dont show me any recomendation.

  2. Suzan Maka Avatar

    It sounds dumb but i dont know where to implement that php code.
    Help me @derek_benas

  3. Ashenafi Gichamo Avatar

    That is so cool tutorial! What would be the easiest way to develop a similar app if i were to use a translation memory that has not webservice/API?

  4. Ashwin Praveen Avatar

    Hello Derek, 
    I am really enjoying your tutorials, they are well edited and precise! Thank you:)
    I am currently working on an application, in the initial stages, I have an error I do not know how to resolve! What I want this application to do is basically retrieve the root node from an xml file which I have created in the assets folder (/app/src/main/assets/tvshows.xml) and display it on the screen using TextView! I have used ideas from your Java Tutorial Video 44 (DOM documents and stuff)! I am getting a null pointer exception, and the application keeps "Unfortunately, stopping". I would really appreciate it if you could clarify this for me.

    package com.example.ashwinpraveen.domdoc;

    import android.content.res.AssetManager;
    import android.os.Bundle;
    import android.support.v7.app.ActionBarActivity;
    import android.widget.TextView;

    import org.w3c.dom.Document;
    import org.xml.sax.InputSource;

    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;

    public class MainActivity extends ActionBarActivity {

        TextView printText;

       @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);

                    Document xmlDoc = getDocument("/app/src/main/res/TvShows/tvshows.xml");
                    TextView printText = (TextView) findViewById(R.id.printText);
                    printText.setText(xmlDoc.getDocumentElement().getNodeName());

                }

                private Document getDocument(String domDoc) {
                    try {
                        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                        factory.setIgnoringComments(true);
                        factory.setIgnoringElementContentWhitespace(true);
                        factory.setValidating(true);

                        DocumentBuilder builder = factory.newDocumentBuilder();
                        AssetManager assetManager = this.getAssets();
                        InputStream is = assetManager.open("tvshows.xml");

                        InputSource inStream = new InputSource(is);
                        return builder.parse(inStream);
                    }
                    catch(Exception e) {
                        TextView printText = (TextView) findViewById(R.id.printText);
                        printText.setText(e.getMessage());
                        return null;
                    }
                }

        }

  5. Antik Lee Avatar

    I saw a bird fly—> chinese : 我 看 到 一隻 鳥 在 飛. Is it ok that I make the correction?

  6. Amit Avatar

    I haven't seen anyone yet who can explain ANY concept this easily. I have to admit that you explain concepts much better than my university prof's…Watching literally all of your playlists and trying them out…cant thank you enough for making all these videos.

  7. Greg o neill Avatar

    On appinventor that is!

  8. Greg o neill Avatar

    Derek Do you cover Secure log in for multiple users in any of you vids?

  9. Paul Mwenda Avatar

    Hi, what is the least possible time I could spent and learn enough language to programe in an average manner

  10. lagz89 Avatar

    Derek, why didnt you use DOM to process the XML returned to the java code? Wouldnt it be easier, cleaner?

  11. Roni Stiawan Avatar

    In app inventor we have "Texting" componen, what is "Texting" called in AS?

  12. OmeglaWaffles101 Avatar

    Nice Video! this makes me want to do more programming!

  13. Mr Mohammad Alaween Avatar

    Actually you're one of the few people who is doing a full series of tutorial on you tube
    Excellent job. ^_^

  14. blake martin Avatar

    Wow Derek, I can't believe I haven't run this by you before (or maybe I have and just don't remember). When ever you segue into c++ and stuff I think it would be a good opportunity to explain how to compile your code to static libs and dlls in such a way that that you can link to your previously written code in different projects with the standard bin, include, lib, dll structure. Which, of course, would entail also explaining how to link to dependencies in the first place. Also, There is another are I (and others I am sure) would like to have help with that, at this point, I don't know enough about the subject to ask about it by name. For instance, I am currently using lua in my c++ game engine to load in settings like level info, game object info, etc. I am literally storing that info in tables in lua because I can't figure out how to use any xml parser that I find online. The reason for that being issues with having to build their source code and deal with dependency issues like that. On a side note, I also don't fully understand the "bindings" jargon term. For instance, I have used wxlua in the past and it required me to build wxWidgets from source to work. Also, I have seen lua files with code that uses opengl. Is this done by c extensions that call the respective c code? How does it know where to find opengl and wxWidgets and such? Environment variables? It seems like the more I learn about programming, the more confusing and stressful all the obscure and more fundamental things about programming are. Where did you learn all that stuff? Where can I find people like you in real life so I can just pick there brains indefinitely against their will?

    EDIT: I forgot to say nice video!!!

  15. aiham alkhouja Avatar

    Dear master. It has been a while. I don't know if you remember me .Thank you for teaching us android developing again. I waited for that i watched all your previous tutorials. And i have improved allot. Because of your lessons and i made my first app and i have 6000 downloads on a third party market place. Because i can't have a google developer account 🙁 .and im working now on another app. Thank you. Thank you. This is what i love to do . And you made it happen. I hope this is a very long series 🙂

  16. Angelina Jolie Avatar

    Hi Derek! in the android apps 14 tutorial do you think checking to see if the input is a number would be good?

  17. JakirulFX Avatar

    Thanks for the tutorials! +Derek Banas

Leave a Reply

Your email address will not be published. Required fields are marked *