1. A method of an electronic device, the method comprising: identifying a deletion of at least some geo-fences among a plurality of geo-fences stored in the electronic device or an addition of other geo-fences; identifying a number of remaining geo-fences among the plurality of geo-fences based on the deletion or the addition; and when the number of remaining geo-fences is larger than a number of geo-fences which can be allowed by hardware resources, grouping the remaining geo-fences as one or more geo-fence groups.