0

Based on the Google Play game services samples, particularly TypeANumber, from (https://github.com/playgameservices/android-basic-samples), I was wondering if it's preferred to implement all of the activities as fragments (other than MainActivity that's responsible for instantiating and connecting to GoogleApiClient) if I wanted my app to be connected to the services the whole time.

Because, I already developed a game app that consists of activities that transitions to each other by using using Bundles and Intents, and now I am just starting to figure out how to implement Google Play game services to my game. I already read the tutorials and whatnot, but I just want to know if it's recommended to use fragments for the other activities.

DaveNOTDavid
  • 1,753
  • 5
  • 19
  • 37

1 Answers1

1

In other words, you're pretty much just asking which is better to use between Activity and Fragment. It technically still depends on you are aiming for. Looked around the community for a while and found these posts where the answers are very much detailed:

Dilemma: when to use Fragments vs Activities:

Why fragments, and when to use fragments instead of activities?

On a simpler note, I prefer to use Fragment when re-usability is needed.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
AL.
  • 36,815
  • 10
  • 142
  • 281