0

I hired a developer to create an android app. The work had been done. I received myapp.apk. It's working properly.

Now, I want to to add push notifications function to the app. The developer is not available again. I did not received any source code. I just received the myapp.apk.

I found that I can extract myapp.apk. After extraction, there is a file called AndroidManifest.xml and many other files and folder.

Can I add push notifications by modifying AndroidManifest.xml file? If yes, what are further steps needed? If no, what are all possible methods to add the push notifications to myapp.apk?

Basem
  • 811
  • 1
  • 7
  • 10
  • There is a lot more work to be done, depending on what backend are you using for push notifications, and to handle the response to those push notifications you may need BroadcastRecievers. – Bugs Buggy Jan 03 '17 at 23:02
  • @ AseedUsmani Thanks so much for your comment. The app is packaged as .apk, can we still implement what is called BroadcastRecievers? – Basem Jan 04 '17 at 06:14
  • 1
    @Basem Have a look at the answers to this question on Quara: https://www.quora.com/How-can-I-decompile-an-android-app-and-edit-its-java-source-and-again-recompile-it and this one: http://stackoverflow.com/questions/3593420/is-there-a-way-to-get-the-source-code-from-an-apk-file – Akram Jan 06 '17 at 12:27

1 Answers1

1

It is much more complicated than just modifying the AndroidManifest file.

Typically, there would be three things to do:

  1. Setup code in your app to receive a Push Notification. This is usually done in a BroadcastReceiver.
  2. Register with some type of service such as Google Cloud Messaging, Firebase Cloud Messaging, or Parse.
  3. You will likely need some type of code on a server that determines when to send your Push Notifications and what the content will be.

Doing it through Google Cloud Messaging / Firebase Cloud Messaging is the more common and robust approach. You can find information about it here.

You could also do it through a service called Parse. I have used Parse in the past and it was much easier to setup than Google Cloud Messaging but is more basic. You can find information about Parse here.

If you are looking for the easiest possible way to send basic Push Notifications, I would go with Parse. There is still a good amount of setup to do, but it is the easiest option that I am aware of.

Stephen Ruda
  • 585
  • 2
  • 11
  • Would note that Parse is closing down their managed service very soon. – Pat Myron Jan 03 '17 at 23:32
  • @Stephen-Ruda Thanks for your answer. Can we say that part 2 and 3 of above answer are easier to implement compared to part 1? Another question; the app is packaged as .apk, can we still setup code in the app to receive a Push Notification? – Basem Jan 04 '17 at 06:02