Questions tagged as 'android-activity'

1
answer

Error trying to include a mapfragment in an activity

I have an activity that should go up with the map (GoogleMaps). But by implementing some methods, so that I can for example, click and add a bookmark, it breaks, with the following error:    Attempt to invoke virtual method 'void   com.google...
asked by 02.02.2017 / 19:22
1
answer

How to reference a button in an xml from another Activty?

This is the error: java.lang.RuntimeException: Unable to start activity ComponentInfo {com.example.octupus.ramonteste / com.example.octupus.ramp.subject.projectAlumni.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual meth...
asked by 04.01.2017 / 02:48
1
answer

Know if Activity is open (BroadcastReceiver or service) [duplicate]

I would like to implement a function that can check if Activity is open, because when I receive the notification through GCM (Google Cloud Messaging) if the activity has opened it will only loads the information in it, if it has closed notify...
asked by 28.09.2016 / 22:13
2
answers

Pass a string from an activity to a fragment of maps

In HomeActivity, I get the string result from the server, it contains all the data I need, separated by commas, so with the method I tried to pass to the fragment of that error FATAL EXCEPTION: main...
asked by 27.09.2016 / 01:32
1
answer

Value drop in getIntent ()

My problem is this ... I have a notification routine that the user clicks on the notification screen, open a new Activity. In this new Activity I show some information that I look for in the database depending on the code that I pass by paramete...
asked by 16.08.2016 / 17:48
1
answer

Pass the id of an enterprise from activity to another and use it in a connection with database

I am passing an id of a user through an intent and I intend to use this id in the second activity. I think it's okay to take a look at the code: I have to pass this activity to another id of the user: ltsunidades = (ListView) findViewById(R...
asked by 07.04.2016 / 13:14
1
answer

Error when using activities in a child package

I have a problem with my Android project in Eclipse. After implementing the functionalities, I came to a total of 10 activities and 8 other classes. From there I realized the need to structure the code and created child packages within the proje...
asked by 03.01.2016 / 21:19
1
answer

How to call a method from another Activity in my Activity?

I have a activity A and a activity B . Activity A has method metodoUm and I needed to use this method in activity B. Anyone know how I can do this? I would be very grateful. I'm picking up to look for something on the inte...
asked by 04.01.2016 / 21:47
1
answer

Dev Android. Null pointer when accessing a button from a fragment by main activity using set contentview

I made the layout of an application where I use the android menu. Menu is in main activity: @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically han...
asked by 11.01.2016 / 17:37
1
answer

Conditional to change activity

Hello, I have a problem, I want to create a conditional on an activity, inside a button, to open another activity in my app.    But how would that conditional be? My app has buttons in the main activity that leads to other activityies. On...
asked by 01.10.2015 / 22:24