Hi, I have a problem using my certificate in mqtt extension. When I put the certificate in Properties  , it works fine. But when I put the certificate in a block  , it doesn't work.
example my cert
I tried three methods, but none of them worked:
Separating the header and footer
 
Combining everything together
 
Splitting by line
 
 
Do you have any recommendations? Thank you!
             
            
              
            
                
           
          
            
              
                TIMAI2  
              
                  
                    April 1, 2025, 11:01am
                   
                  3 
               
             
            
              If you are developing with Niotron, why are you asking here ?
             
            
              
            
                
           
          
            
              
                Taifun  
              
                  
                    April 1, 2025, 11:25am
                   
                  4 
               
             
            
              Assets are read only
 TIMAI2:
 
Niotron
 
 
Thread closed,  wrong community
Taifun
             
            
              1 Like 
            
            
                
           
          
            
            
              I can do this on the Companion, but after generating the APK, it doesn't work. I think the issue is due to an incorrect file path, but I don't know the correct one.
             
            
              
            
                
           
          
            
            
              Can you tell me about media section?
             
            
              
            
                
           
          
            
              
                Taifun  
              
                  
                    April 2, 2025,  4:12pm
                   
                  10 
               
             
            
              
 Thanyasit:
 
media section
 
 
The media section is that part of the designer where you can upload files into your project like images etc and also your cert and key file
Taifun
             
            
              1 Like 
            
            
                
           
          
            
            
              Thank you! Oh, I understand you now, but I can't hardcode the cert in the app because it changes based on certain conditions.
             
            
              
            
                
           
          
            
              
                Taifun  
              
                  
                    April 3, 2025, 12:17am
                   
                  12 
               
             
            
              In this case I would store the files in ASD (which is the default location for the file component) and set them from there
To get the path to the ASD you can use an extension,  for example Get the path of → ASD (app-specific dir) & → private data dir (internal storage)  or these blocks
  
  
    Hi everyone, 
I use this blocks to get the ASD path in my app: 
 [blocks]  
When I install my apk in my phone, it creates the following path: 
/storage/emulated/0/Android/Data/myappinventor.ai_USERNAME.appname/files 
The "username" is the username of the e-mail address of my MIT App Inventor account. 
I would like to replace the "username" with a custom string. How could I do this? 
Thanks in advance for your answers. Kind regards.
   
 
Taifun
             
            
              1 Like 
            
            
                
           
          
            
            
              UrsPahoMqttClient version 1.2.1 supports this functionality
             
            
              
            
                
           
          
            
              
                system  
              
                  
                    April 17, 2025, 11:13pm
                   
                  14 
               
             
            
              This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.