[Solved] Problems using Bundle. Unable to find method?

You want to retreive data from saved instace bundle then make use of following method in your activity. @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); this.animationNumber = savedInstanceState.AnimationGetNewNumber();//your code of retriving data from bundle Log.i(“debug”, “saved data: ” + myString); } Note: there is no open() and close() method for bundle instace. solved Problems using … Read more

[Solved] passing data from service to fragment giving null point

Instead of passing data indirectly i used the direct way and i set like this in service Intent intent = new Intent(); intent.setAction(MY_ACTION); intent.putExtra(“DATAPASSED”, activeAudio.getTitle()); intent.putExtra(“ALBUM_DATA”,activeAudio.getAlbum()); sendBroadcast(intent); in my fragment @Override public void onStart() { super.onStart(); myReceiver = new MyReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(MediaService.MY_ACTION); getActivity().registerReceiver(myReceiver, intentFilter); } private class MyReceiver extends BroadcastReceiver { … Read more