Trying to Create Android TV app... please help! - Shield Android TV Q&A, Help & Troubleshooting

I have only created one app in my entire life and that was this Hello World app. I am in the midst of creating an Android TV AppLock because nothing exists. Not one AppLock for Android TV.
I chose Android TV for my format, and I keep getting these errors in Android Studio telling me about rendering errors for fragments, so I'll choose something like browse fragment or something. I can't add text, I can't add buttons, I can't add anything. I try and drag and drop from the Pallette column (under "Widgets"... like TextView or whatever), and nothing happens. It's just blank.
I just want to start by creating a menu or something where I can then point it to a list of apps in the system where a user can choose to password protect them. And then some settings where the user can choose a pin or an unlock code of some sort.
I just don't even know where to start. Can anyone point me to some thorough Android TV tutorials?

Have you tried this: https://developer.android.com/training/tv/index.html
Sent from my iPad using Tapatalk

Related

App Idea/Request

I want to be able to set up a series of menu's, at the end of selections it then links to an image, like a jpg or pdf perhaps.
Let me put it in a context. Maybe as a playbook viewer (American Football). I start with 'Offence' and 'Defence' as my options, which ever I choose takes me to a list of formations, then to 'Pass' or 'Run' then a list of plays. When I select a play if shows an image of the play.
Another might be job descriptions. I select the level 'manager', 'assistant' etc, then the section and then it shows a job description as an image or I guess text.
I think there are probably quite a few uses for this. I know I could set this up with basically web pages stored locally on my phone, but it would be kinda cool to have some smooth swooshing animations and such.
I'm wondering if it should initially be a desktop application so you can link up the menu's and images and it then compiles an apk for you?
Is this possible?
More generically...
What you're describing is a hierarchical database.
You need a tree manager app - where all your 'menu items' and subordinates are simply nodes and leaves of the tree.
A generic app would allow nodes/leaves to be 'textual', iconified, or pictures.
I haven't done any searches... but given that iconified list views, and cursored SQL queries are part of the standard package.... I'd think this would be relatively straightforward to both develop (app to add nodes/subnodes, builf the tree, enter/import the content) ship (app to serialize the database config+data, as a psuedo-app) and deploy (load a serialized db, execute it)
I'm a noob at android & at Java - but I might take a crack at something if I ever find time (my job & family don't leave a lot of time for anything else)

[Q] Each view a new activity?

I'm learning how to program in android and want to make a musicplayer. The problem I have now is I have no idea how to build the views for the application. For example if you start the application you have the options, all songs, artists, albums. If you then select artists you get all the albums from that artist, if you select an album you get the songs etc..
Now my problem. Do I have to make a different activity per view (all songs view, artist view, album view), because they all do almost the same, just fill a listview with some data.
Can sombody point me to a tutorial of give me a hint how to do this because I'm trying to find a solution for 2 weeks now and all 101 "noob" basic tutorial I found don't cover this.
Thanks in advance.
Nobody who can point me to the right direction?
I would create a new activity for each, but create a base class that has the listview in it. Then in each new activity, just inherit from that base class and call a method to fill in that list view with the data specific to that particular activity.
-frank
Sent from my PC36100 using XDA App
Hello!
I'm only new to android development too but I'd suggest two things. Firstly you need to make sure the music playing is being done by a service so it works in the background. Secondly, I don't think you'll need a different activity for each view. List views are populated by adapters if I remember right so maybe one view to choose the music filter and the next view will choose the correct adapter and populate the list....
Hope this helps a little.
Sent from my X10i using XDA App
@kaediil, I think I try that, I'm open for other suggestion tho.
@Keithod, the mechanics to play a song are already done, the vies are the only problem. And I tried it with adapters but how am I'm going to handle the onclick then? That would be one hell of a switch statement.
Is there a tutorial that handles these kind of problems?
If your music player created a database of the metadata, artist, album etc. Then your adapter could use the ID of the element that was clicked as the criteria for the select statement... No switch required and only one activity...
Sent from my X10i using XDA App
I now get the id3 tag from the song and build the views that way, I could dump it in a database when the application start. Let me try that.
After a couple of days I am still stuck, I prefer a tutorial or a snippet how I could fill 1 listview and when I click a specific item another listview or the same will be filled with other items.
Hope somebody can help me with this.
What went wrong with the database idea?
Sent from my X10i using XDA App
Then I still have to display it, or it's from an arraylist or database.
Try using a ViewFlipper: http://developer.android.com/intl/zh-CN/reference/android/widget/ViewFlipper.html
You don't need to have one Activity for every view, you can choose to display different info depending on the previous Screen or if the user has clicked a different button.
An example:
- An user clicks on a button that goes to PSN and recover a list of latest games played by the user with his playstation.
- You put a flag on the Bundle Extras to indicate to the next ListView activity that you want a PSN info.
- In the ListView Activity you recover info from PSN. If the user clicks on the Xbox Live button you use the same Activity to query Microsoft's website. You can even load a different XML Layout for PSN or Xbox Live in that same Activity and have 2 completely different Layouts for a single Activity:
Code:
if (xbox)
setContentView(R.layout.achievements_xbl);
else
setContentView(R.layout.trophies_psn);
Anyway, if the methods are not shared to display different info in the Activities is a good practice to have different Activities Classes, you can have one XML Layout if the List Rows are similar and use in two different Activities.
Helper Classes, to separate business code from Activities are also a great tool.

Store Item Finder / Item Locator

I'm trying to build an app for a school project that will locate items in a grocery store. For example, if I type in "orange juice" into the app, it will create a marker on a floorplan of the store. In this way I want to be able to populate a map with markers that correspond to items in a grocery list. Users can then walk around the store and swipe off markers as they pick up the items.
Does anyone know how I could do this? Are there any open source Android apps currently out there I could look at?
I feel like this would be a fairly simple project involving just uploading a .jpeg into an app and assigning coordinates to classes of items, like "juice" to {20,30} or something like that, but I have very little programming experience and am lost as to how to start.
bump
Well, people normally do not get an answer if they ask how to do the whole app.
So try to find the solution yourself and ask the community if you've got more specific questions/problems.
nikwen said:
Well, people normally do not get an answer if they ask how to do the whole app.
So try to find the solution yourself and ask the community if you've got more specific questions/problems.
Click to expand...
Click to collapse
Yeah I realize that I'm not going to get a step by step process... but I was just asking for general advice. Somebody suggested I use a .shp file and use an overlay with all the markers corresponding to the items, then create a pop up marker event for every time the user selects an item, which was helpful.
I'm looking for general ideas on implementation, that's all.
justinyeh said:
Yeah I realize that I'm not going to get a step by step process... but I was just asking for general advice. Somebody suggested I use a .shp file and use an overlay with all the markers corresponding to the items, then create a pop up marker event for every time the user selects an item, which was helpful.
I'm looking for general ideas on implementation, that's all.
Click to expand...
Click to collapse
You could save the name and the coordinates to files using JSON which can easily be written manually.
Have a look at Google's gson library.

Practice App Ideas

I am new to Android App development. I need some simple application ideas to practice. please give me some ideas. I just made Rock, Paper, Scissor game. So easy games like this will be fine(I think )
Build a notepad app that lets you write and save notes. Build it steps where you increase the difficulty as you go on:
Make an app with a textbox that lets you enter text
Add a save button and learn how to execute code when the button is hit. Whenever you encounter any problems or don't know what to do, use Google! There are a lot of other running the same path as you and me who have encountered problems. The solution is almost always a search away!
Implement a save function that saves the content when the button is hit. When the user reopens the app load the text file and put the content in the textbox. Tip: Use SharedPreferences
Time to add support for multiple notes! Start off by learning how to move between activities (windows), in your notepad app add a button labeled "All notes" that sends you to another activity when clicked. Use Google to finds articles on how to do this.
Once you've figured out how to move between windows, it's time to create a list with all the notes. To display a list you use ListViews, before jumping in to showing the actual notes create a mock list containing your favorite cars, cats, Justin Bieber songs, whatever! Once you get a hang of it, move on to the next step
Learn how to store multiple strings instead of just one. Check out JSON, it's a simple data structure that lets you store.. data. Tip: store the notes in JSONObjects in a JSONArray. The final JSON-string can be stored in SharedPreferences.
Once you get a grip of JSON, add an add button, preferably in the ActionBar, that lets you add notes. Save the new note in the JSONArray.
Replace the cars or cats that are currently shown by the created lists.
Voilà, you have a fully functional notepad app and you've learned how to: move between activities, store data, ListViews, find solutions with Google etc. Good luck!
What are you aiming for, eventually ? Do you want to be a game developer, utility developer, are you aiming for a job developing apps ?
That might help you decide what kind of test apps to make.
If you go for a game you could spend a fair bit of time dealing with the graphical elements and gameplay without understanding the basics... so before you do that I'd suggest getting familiar with the building blocks (Activity, Intent, Service, Handler, Looper and so on) first.
jokernw said:
I am new to Android App development. I need some simple application ideas to practice. please give me some ideas. I just made Rock, Paper, Scissor game. So easy games like this will be fine(I think )
Click to expand...
Click to collapse
I started with memory game, you can go for it as well

Developer needed on partnership basis.

Hi All,
I am looking for someone to help create .apk for Android boxes.
This will be an ongoing partnership as we will update the apk with regular update every month which should automatically show on clients box.
If you think you are the right person and have time on your hands to create apk please let us know.
I would also like to know about how the firmwares can be altered on android boxes.
If you have hands on customised XBMC and other live streaming links we would like to create them as well within the apk and XBMC. Preference given to developers who have worked and developed something unique and have ideas of developing something new!
The main thing I am after is creating 1 or max of 3 files which will
1. Root the android box
2. Install the new apk file/firmware
3. Install the customised XBMC with our logo, etc.
I am looking at a quick option to connect android box with computer and run the files to achieve the above points.
Looking for a favourable reply.
Private ANDROID IPTV + PHP ADMIN PANEL
Android Apication Side
1.Play/Pause online TV/Video Stream.
2.Movie Stream 2D and 3D
3.Supports 720p/1080p HD mp4,mkv,m4v,mov,flv,avi,rmvb,rm,ts,tp and many other video formats
4.Radio Stream
5.All streaming protocols are supported, including HLS (m3u8) , MMS, RTSP, RTMP, and HTTP.
6.No Flash Player Required.
7.Ads Support
8.Low Memory and CPU Usage
9.Secured APP everything is based from Server,the app not save streaming links on IT
10.App will not work if someone copy it to any other device.
11.Add your info in “About US ”page on app.
PHP Admin Panel Side:
1.Advanced PHP Admin Panel.
2.Easily Add Category.
3.Easily Add Channels.
4.Edit and Delete Category.
5.Edit and Delete Channels.
6.Device Manual Activation,The app is secured,You can activate or deacitvate any client anytime.it works on unique Device ID.
7.Json Service
8.You can add custom channels and categories to each device.
9.It is good idea for starting IPTV Bussines,u can buy Android tv boxes and to install the app.
10.Good for bussines for new GOOGLE Android TV OS.You can install this app direct to any tv device without extra cost
11.You never need to update the app.You update Clients from Admin Panel

Categories

Resources