문제

I have several Android apps which I want to upload to Nokia X store. Some of the apps can run on the phone without any modification needed.

However some of them which used android specific services such as GCM, Google Map needs to be replaced with Nokia Push Service and Nokia Map. (According to the apk test tool)

Now my question is:

  1. is there a way that I can still manage both piece of source code in the same version control repository?
  2. can I configure eclipse to build nokia-x apk or android apk by some configuration?

The reason is 95% of the code are shared. Only GCM and Google Map are handled differently. It would be a pain if I put them in 2 repositories.

도움이 되었습니까?

해결책

If you check the documentation provided at the nokia site. The OneApk sections for each API would be explaining excat steps to achieve this.

다른 팁

Dr.Jukka has good point as developer.nokia.com documentation is covering this question.

Just to summarize what documentation says:

  1. You should use same source code and even same apk file.
  2. You can runtime-check if here maps are available and based on that select correct MapActivity or MapFragment: http://developer.nokia.com/resources/library/nokia-x/here-maps/one-apk-with-here-maps-and-google-maps.html
  3. You can runtime-check if you should use GCM or Nokia Notifications by trying to use GCM and if it gives UnsupportedOperationException, you can catch that and use Nokia Notifications: http://developer.nokia.com/resources/library/nokia-x/nokia-notifications/one-apk-with-nokia-notifications-and-google-cloud-messaging.html
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top