              ~(when (and (not (:neko.init/release-build *compiler-options*))
                          def)
                 `(def ~(vary-meta def assoc :tag name) ~'this))
+             (.put all-activities ~(or key *ns*) ~'this)
              (neko.init/init (.getApplicationContext ~'this))
              (~on-create ~'this ~'savedInstanceState)))
        ~(when on-create-options-menu

  - same as :on-create but require a one-argument function."
  [name & {:keys [extends prefix on-create on-create-options-menu
                  on-options-item-selected on-activity-result
                  on-new-intent def state]
           :as options}]
  (let [options (or options {}) ;; Handle no-options case
        sname (simple-name name)

                                                k))))))]
    (doall (map request-feature features))))

(def ^WeakHashMap all-activities
  "Weak hashmap that contains mapping of namespaces or
  keywords to Activity objects."
  (WeakHashMap.))

(defmacro ^Activity *a
  "If called without arguments, returns the activity for the current
  namespace. A version with one argument will return the activity for
  the given object (be it a namespace or any other object)."
  ([]
     `(get all-activities ~*ns*))
  ([key]
     `(get all-activities ~key)))

(defmacro defactivity
  "Creates an activity with the given full package-qualified name.
  Optional arguments should be provided in a key-value fashion.
