I have seen many examples with
startActivityForResult(Intent, int)
and then using
onActivityResult(int, int, Intent)
but for me I dont need to pass anything, I simply want to startActivity(intent), and when intent activity returns, a method get called in main activity..
Any tutorial on doing this?
EDIT:
Here a sample code:
public void onCreate(Bundle savedInstanceState) {
super.onCrea
I have two activities:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void click(View view) {
Intent intent= new Intent(this, TranslucentActivity.class);
startActivity(intent);
}
}
public class TranslucentActivity extends Activity
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
and use this method
moveTaskToBack(true);
I'm developing an application and at the last activity I need to exit it, I have used the above methods which exits the application the problem is it exists the ONLY the activity and the appli
i want to use chart in android, i use this framework http://www.achartengine.org/
this class will use when start:
public class ChartDemo extends ListActivity {
/** Called when the activity is first created.
what are the reasons that would affect my intent not to load the next activity i've fixed my manifest the intent is correct the button is okey and the activity is good basically i don't have any errors or i don't see any can anyone clear this things for me i need help..this is my intent if you would like to check it
final Intent intent = new Intent();
intent.setClass(MainActivity.this
Hi friends i have a problem...
Actually i use this code to open my application in certain time..the app is working fine but when the device is in sleep mode not working..??
public class MyBroadCastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context ctx, Intent intent) {
Intent intent = new Intent(ctx, ActivityMain.class);
intent.addFlags(Intent.FL
I am creating a service in my applicatoin.
Here is the code i used.
public class LocationService extends Service{
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
Log.e("Location Service", "onStrat of service");
}
@Override
public void onCreate() {
super.onCreate();
Lo
I want to pass a value from one avtivity to another activity by use intent.. Im not getting the value im getting as null.. There is no error in my logcat. Any help would appreciated. thanks in advance.
I am having an issue with Android camera Intent. I just need to save the image and load another intent after taking a photo. But before doing any of these it load the camera again and after few seconds, it will load other intent.