You are here

Android App: Open own ServiceFragment through NavigationDrawer? | Cypress Semiconductor

Android App: Open own ServiceFragment through NavigationDrawer?

Summary: 1 Reply, Latest post by Madhu Sudhan on 14 Aug 2016 12:22 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
thrustmaster_1641326's picture
1 post


i would like to edit the Cysmart Android App and especially the Navigation Drawer, so i can choose from there a BLE Service, which i've created. 

I've edited so far the NavigationDrawer with my own structure. On my navigation there is a parent-item which has three child-items. Also i've created a ServiceFragment which works great so far. My goal is now to implement it in that way, that when i choose e.g. the first child-item on the NavigationDrawer, that it opens the ServiceFragment that i've created.

My created service is a Fragment and not an Activity. Therefore i have to open the Fragment from a Fragment (NavigationDrawer). I've tried some solutions with the FragmentManager, but i can't find a solution for this, as the App always crashes. 

What does work is, when i try opening the existing AboutFragment with this (Code is in NavigationDrawerFragment):

private void selectChildView(String childText) {

if (childText.equalsIgnoreCase(getResources(). getString(R.string.navigation_drawer_testmenu))) {

AboutFragment aboutFragment = new AboutFragment();





But when i try this with my own ServiceFragment that i've created, it crashes. Even when i'm connected to my BLE Usb Dongle. 


So does anyone have any solution ideas? How and what do i have to implement to achieve my goal?

I really would appreciate any help. Thank you very much in advance!

Best regards 

mady's picture
Cypress Employee
964 posts


Please check the Tech Support Case you have created with us.


- Madhu Sudhan

Log in to post new comments.