I am a newbie to Android and playing around with the UI and SQLLite for a while and it looks pretty good to me . We have a requirement that for the App that all the questions would be coming from the server through REST / Web service which would be displayed on the App..
say for e.g if there are 4 questions
1) Enter your Name -- Text Box
2) Did you sleep well last night -- YES / NO
3) How many hours did you sleep - Text Box
4) How did you hear about us -- Drop down
So the requirement is that the Questions would be displayed on the App after doing a SYNC with the server during the SYNC with the server the Questions would be downloaded from the SERVER through REST / Web service..if the phone is not connected then pull the questions from the Database...
These questions are simple questions and they change quite often and we have a similar app which is there for iphone which does this ....
Has any one worked on this before please advice me so that I can get it started
We did something similar for an e-Learning app. Decide on the number of type of questions and create custom types by extending the conventional views.
Eg. To get a multiple choice question: Using TextView and RadioGroup (RadioButtons) you can create a custom type. Create your own attributes or create setter/getters to initialize title, options, right answer and load the view dynamically at run time.
Related
Hi everyone I have a problem and I don't know how to solve it.
For reference I have root privileges on my device.
It's a question related to domain of pentesting I suppose. But basically there's an app and I know how it's layout is structured from using UIAutomator. I want to scrape the live data that it presents in a list, mainly the TextView elements. After scraping these I want to programatically determine which element to click (hence trying UIAutomator to for clicking).
Unfortunately UIAutomator was too slow and not good for me. I have root so I figure something similar should be possible but I have no clue on where to start.
Basically I want to scrape data and perform UI scrolling, clicking and swiping programatically like Robot class in java.
Read TextViews contained inside a ViewGroup for the apps Activity
Click on one if a certain condition is met
Perform automatic scrolling if necessary
Perform clicks and swipes
I've read that Xposed can be used to read info by hooking provided you have access to the apps code but I do not. I have also tried to decompile the APK to find the methods at that Activity but didn't get anywhere.
Any advice?
Edit: I have already tried examining the API using Burp Suite. While this is also a solution and it works, I would rather have the alternative.
I am thinking about creating a text-based game (similar to gamebooks) for android device. In this moment only theoretically. Do you have some advice please, which way to go?
You probably know how gamebooks works, but the gamebook I want, will be very easy, should work like this:
User has shown some image, text and 3 options (questions), he decides which option to click, then a new page is showing (according to the clicked option) with another image, text and another 3 options. Then again, the user clicks one option, another page opens, etc.
My question is not how to do it programmatically, but how to start with this in Android Studio, what system to use for such game on android or which way to go.
Because I think it has no sense to create intents after each click, as there might be hundreds of clickable options.
I have already created such game on my website with php/html/js, but I want to create it also offline for android.
Intents implies one activity per page - unmaintainable.
You should work with a database and load based on user interaction. So you'll need to learn about Databases and Asynchronicity (working in the background while updating the UI so the user knows)
I am working on simple app, similar to Instagram, Facebook app or G+ app. I want to make board with other users posts. The posts on board will be displayed in bocks, simular to Facebook:
How should i create such blocks, that i can fill with downloaded data and add up to the board, modify them or remove them from board while user is still in board activity? Is there any class that i could use?
You should probably look at ListView.
It lets you maintain a list of objects and build views from visible ones, add more dynamically etc.
As for the actual block.. Depends on how you want to display them. I hope you know about View types such as LinearLayout etc, if not you should probably read some basic guide for android programming before you begin.
My app is a client for a freeware PC-based PVR application which allows the user to view a TV Guide and select TV shows to record and send a request to their own PC to schedule the recording (or cancel a previously scheduled recording).
One of my users has requested a feature to show all shows / all channels in a vertical list with shows divided by a 'timeslot' indicator / divider. They provided an example image as below...
My problem is I can't work out what sort of list that would be using. It seems in theory I can do this with a standard ListView and a custom adapter but I'm also wondering about ExpandableListView as those timeslot indicators / dividers could perhaps be implemented as group dividers.
I've never worked with ExpandableListView however so I'm not sure if that's how it works and it suggests all groups will need to be expanded by default.
I've done a lot of reading on both classes and looked at a variety of sample code on the Android developer web site but I still can't work out what approach to take. I'm sure I've seen a similar question on SO but can't find it to see what the answer was. Any pointers gratefully received.
I would bet for ExpandableListView; though it could be a regular ListView with two types of view, one for the separators and one for regular items.
In which way is it possible to update an app? Except download the hole app thru the market.
To be more specific. Let say I have a app with a main menu with 3 choices
1 Data
2 Tools
3 Settings
For 1-Data...
...gives you a new view with a menu(submenu) which each row give a view that contains normal data as text, pictures (maybey video).
If all data must be stored on the phone to be reach offline.
1.1 How can I update this kind of data? Like change/add some text, photo etc from a server??
1.2 Is it even possible to add new menu rows with new data from a server? Only know about xml menu but these feels so permanent.
For 2-Tools...
...that have a new submenu like before. But here the menu use hardware futures and api:s. Like, uses gps to get a position and show it on a map or make a call or something...
2.1 For this kind of stuff, is it possible just to update a specific changed class that the app could download from a server or something similar?
For 3-settings...
...If you could change the language here.
3.1 Is it possible to update the app from a server with a new language automtic when the translation is ready? Just download the xml:s?
Would be good instead of that you have to noties the user, so the user manually have to download the hole app again (< v2.2).
Im new to this, dont have the hole picture yet.
The common way of doing this (which is accepted by anyone using an Android Device) is simply publishing the new App-version on the Android Market.
Although, it should also be possible to do it like you said but since Apps are not allowed to download runnable code their self (for security proposals) it doesn't madder. Also if you want to improve new functions, you might need more permissions to your Android Manifest (it would be very bad if this file could be edited at runtime...).
If you have an App which works like a client for an Online-Service, it's sure okay to update those contents, but the things you asked for should really be done using the normal App Market.