Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have written code to get all the list of installed apps in the device and pick one to run. Now but I want that when an item is clicked the item should get added to another list which would be used in another activity.
I have ActivityA which lists all the installed apps. When an user clicks an app in ActivityA it should be added to arraylist which is used in ActivityB. i.e. ActivityB will just have the apps that are selected by user in ActivityA. How can I do that?
Also this ActivityB is in another app so what should I use to store the arraylist? SQLiteDatabase or is there something much simpler than that?
Thank you.
If I understand your question correctly, you essentially want to store information across applications. The best way to do this would be through a ContentProvider
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
Improve this question
I want to make an app to open another app and click on a coordinate.
I know it is possible in the windows app I'm just looking for a way for android.
I designed an app that opens another app.
+I'm the only user of my app, so it could have any permission that requires.
I won't say it is impossible, probably with some hack, but it is impractical and raises a whole lot of issues. There are ways that Android allows for apps to share data and to communicate, but clicking button in another app, NO.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
my app is an app for nightlife events. It's going to have two type of users:
user 1 is the normal user who looks at event
user 2 is the owner of a bar or a promoter.
These users don't have the same privilege, and can't do the same things. So the layout and functionalities won't be the same,
When the person logs in, I'm able to know which account he owns (thanks to my database). More precisely, user 1 has a keyAccess =0, user 2 has a keyAccess =1
I'm thinking of the code design of my app. What is the best way to handle this multi-account ?
I've thought of creating each time 2 types of activities, and check the value of the keyAccess before launching the intent. Is it good? do you have a better idea ?
Thanks a lot
Welcome to SO. A note - a good question shouldn't be opinion based, you need to ask a concrete question.
Plenty of bar app's exist and in my time working in the field I even saw some tutorials on just this. The simplest option is to create two separate apps or at least separate Activities, particularly as the only thing these two things share is the database (This applies whether you've set up as a web service or it's all on a single in-house device)
If you insist on a single app then just change the fragment or layout shown based on that boolean. There are really so many easy options available that it is impossible to give a more decisive answer to your question.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
i created an Android application but to use it properly , I need to get the objects informations from a database .There are some SQLITE definitions but as far as i see , SQLITE is related to the device which already uploaded my app. But my intention is to send informations from just a server to the all devices. The app needs to get the objects informations from the database which will be in my computer as a server , Do you know how can i handle this ? For example if I download MySQL and create a row which is like ;
Product A: 20
Product B: 0
can i get these to the app and so the app make calculations thanks to these informations?
Please let me know if i wasn't clear about my problem
I used Couchbase for database needs. It is NOSQL. You use JSON objects instead of rows. It is super quick though.
http://www.couchbase.com/communities/couchbase-lite
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I want to fetch data and show it in grid view which is in Fragment but I am getting error.But when I tried to implement same thing in Activity it is working fine why it is happening so?..
Why things get different when implemented in Activity and Fragment?
Can Anyone tell what is to be changed and where we can get stuck?
Thanks.
Slow down. Fragments are tough to grasp and implement when you just got started. To get a better understanding work yourself through this guide. Also make sure you experiment with this example project. Both link to the official Android Developers site.
EDIT: To get the basic picture, make sure you understand the Activity lifecycle and how this lifecycle connects to the Fragment lifecycle. To save yourself from frustration over getting stuck, watch this video and concentrate on the image at 6:10. If you want your Activity and Fragment objects to communicate smoothly, you will need to know when and where you can make method calls and callbacks. There's plenty of other useful material, just keep on searching.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I wonder how google does it?? When you first power your device on, A introduction to apps and features will be shown in green color when user touches it the element will disappear ! I tried searching google but i don't get exact idea of what that layout / element was? Please regret me if this was a duplicate question.
this is definitely what you are looking for
Holo-themed transparent demo overlays
Are you just trying to do something on the first launch and then never again? Or are you looking for that look and feel? If so, it's probably just images and such layed out. If you want to test the first launch, there's a few ways to do it. One of the easiest is to create an empty file in the shared preferences in your onCreate() method, then check to see if it is there. If it's not there, you do your on first launch action and then create the file afterwards.
Check this out: Determine if android app is the first time used