# How to access Native Android code from uno

**URL:** <https://forums.fusetools.com/t/how-to-access-native-android-code-from-uno/7714>\
**Category:** How-to Discussions\
**Created:** [April 12, 2019, 3:23pm UTC](https://forums.fusetools.com/t/how-to-access-native-android-code-from-uno/7714 "2019-04-12T15:23:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![remnnis\_scion](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@remnnis\_scion](https://forums.fusetools.com/u/remnnis_scion)\
**Post date:** [April 12, 2019, 3:23pm UTC](https://forums.fusetools.com/t/how-to-access-native-android-code-from-uno/7714/1 "2019-04-12T15:23:23Z")

</div>

I am trying to tie in native android code into fuse but I am having trouble accessing native java from uno. Here is my code below:

[UXGlobalModule]  
public class VoiceCall : NativeModule  
{  
static readonly VoiceCall \_instance;

```
public VoiceCall()
{
    if(_instance != null)
        return;

    _instance = this;
    Resource.SetGlobalKey(_instance, "VoiceCall");
    AddMember(new NativeFunction("startVoiceCall", (NativeCallback)startVoiceCall));
}

object startVoiceCall(Context c, object[] args)
{
    VoiceCallImpl();

    return null;
}

[Foreign(Language.Java)]
extern(android) void VoiceCallImpl()
@{
	Activity a = com.fuse.Activity.getRootActivity();
	Intent intent = new Intent(a, VoiceChatViewActivity.class);
	a.startActivity(intent);
@}

```

}

When I try to run it I get the following error:

Error E3102: There is nothing named ‘VoiceCallImpl’ accessible in this scope. Are you missing a package reference?1.18 s.

Its as though uno cannot access the java function even though its defined within the same class. How do I solve this?

---

<div class="post-metadata">

**Author:** ![remnnis\_scion](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@remnnis\_scion](https://forums.fusetools.com/u/remnnis_scion)\
**Post date:** [April 12, 2019, 9:51pm UTC](https://forums.fusetools.com/t/how-to-access-native-android-code-from-uno/7714/2 "2019-04-12T21:51:10Z")

</div>

I just found out that running build from the command line as opposed to fuse studio runs the code well 😛

---

<div class="post-metadata">

**Author:** ![aeq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/aeq/32/129_2.png) [@aeq](https://forums.fusetools.com/u/aeq)\
**Post date:** [April 15, 2019, 5:20am UTC](https://forums.fusetools.com/t/how-to-access-native-android-code-from-uno/7714/3 "2019-04-15T05:20:07Z")

</div>

The desktop preview can’t run native code, you have to test on device for that.
