Can't get the information from FeatureLayer after add my basemap
A layer's name may only get populated after the layer is loaded (there are many properties like this). So make sure the layer is loaded (layer.getLoadStatus() == LoadStatus.LOADED), before trying to get it's name. Layers will be loaded automatically if you add them into a MapView and display it, but if you create them independently in code like this you might need to explicitly load them (layer.loadAsync()).
I think you will need to add more information here before anyone can help. What error are you getting, or what value are you getting back from which method that is not what you expected?
Retrieving data ...