I try to run :
http://www.smallscreendesign.com/2011/09/29/air-native-extensions-rock/
I downloaded the code and imported the project folder (AndroidExtensions_Demo) in Flash Builder 4.6, changed the air version to 3.1, changed the flex compiler to 4.6 as that is what I’m using and ran it on the device.
However, when I clicked on Send button, I got the error below.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.ssd.ane::AndroidExtensions$/get context()[/Users/anto/git/Android-AIR-Extensions/AndroidExtensions/src/com/ssd/ane/AndroidExtensions.as:158]
at com.ssd.ane::AndroidExtensions$/shareText()[/Users/anto/git/Android-AIR-Extensions/AndroidExtensions/src/com/ssd/ane/AndroidExtensions.as:48]
Is there another way to send SMS with Flex Mobile ?
I want to avoid the manual sending SMS process by pressing "Send" or "Ok" button
The reported exception refers to a failure during the context setup of the ANE. It should be mostly related to project configuration in many different ways.
Make sure you're setting the correct path of the ANE in your project and please consider a full rebuild of the ANE, including the native (Android) code in order to avoid further problems.
Edit:
Unfortunately AIR doesn't provide any native other way to send a SMS save calling the navigateToUrl() using the sms: uri scheme (eg: navigateToUrl("sms:5551234567"); ). This way however the system SMS editor will be shown and you can't specify any body neither.
The only way to send an SMS in a full programmatically way is to write your own ANE and leverage Android APIs in order to get the things done.
Related
I started a new project in vue.js. I added navbar. At one point, I noticed issue in the console:
Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform
I don't understand this, because I don't use any navigator in the project.
Why am I seeing this issue? How can I change it?
The reason one sees the message is well explained in the description of the very same message (audit).
The real question is who/what is the source of it. There is a hint to the file extended-css.js.
Here is an example with another file (as I do not have the extended-css.js):
Right click on the file and then choose Open in new tab.
So there you can see that the reason for the audit message is the hook.js file from the Vue.js devtools extension.
In your case it would be another extension or library you are using - direct or indirect (for example a part of vuetify, etc.).
From there you have 3 choices:
ignore it
wait for the authors of the library to fix the issue and update it
disable the extension/remove the library causing it.
https://blog.chromium.org/2021/05/update-on-user-agent-string-reduction.html
Is helpful to read. Some key points:
"Beginning in M92, we plan to start sending deprecation notices for the navigator.userAgent,
navigator.appVersion, and navigator.platform getters in the DevTools Issues tab."
"If your site, service, library or application relies on certain bits of information being present in the User Agent string such as Chrome minor version, OS version number, or Android device model, you will need to begin the migration to use the User Agent Client Hints API instead."
I know I am not using the navigator getters in question so at this point, it seems I can only wait for an update to the library's .js
(in my case, bootstrap 4) to make the warning go away.
We support iOS 7, so I am not using a framework. The app is mostly objective-c, and the watchkit extension mostly in swift. The AppDelegate manages the Core Data objects.
Our app allows the user to choose a configuration to change what they see. They can switch to a different configuration. When they switch, we remove most everything from NSDefaults and we remove the sqlite database and recreate it. When they switch, its basically starting over.
On the watch side, I have a swift class that has a lazy loaded Singleton of an object that manages the core data objects. But when the app resets its data, how can we report this out to the watch extension? I am guessing that I have to reset the managed object context that the extension created.
You can use MMWormHole to send messages from your iPhone app to your WatchKit extension. In your WatchKit extension you can set the stalenessInterval for your Core Data database to something really short and you will also probably want to refresh your NSManagedObjects.
2 questions about using a QR code in an Android device:
1. Is it possible to launch a native Android application from a QR code? Maybe by some configured URI schema?
2. Another option which might be useful for me is to have a QR code scanner inside my own app. Will it be possible for me to somehow include a different app that scans QR codes inside my app? Or will I have to implement the scanning myself?
Thanks
To scan barcodes in Android by Intent, see https://github.com/zxing/zxing/wiki/Scanning-Via-Intent
To trigger an app from a QR code, yes, you need to register the app to handle the particular custom URL scheme. This is how the same app can respond to clicks on the web: https://github.com/zxing/zxing/wiki/Scanning-From-Web-Pages
Look at how it registers to handle URLs here: https://github.com/zxing/zxing/blob/master/android/AndroidManifest.xml
1.to use a configured schema you can check this post
Launch custom android application from android browser
Then the you could QR code this scheme just like market://
2. You could use Bar code scanner app and use below code to launch or you could even integrate the zxing library to scan yourself.
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("SCAN_MODE",
"ONE_D_MODE,QR_CODE_MODE,PRODUCT_MODE,DATA_MATRIX_MODE");
startActivityForResult(intent, 0);
Currently on my website i am trying to get it so that a user can upload an image from their local images. I have followed a tutorial, but when i debug it and try to open up my images folder i get this error message:
"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."
Please can someone help me here, i have read a few posts; but seen as this is my first time doing this; i dont really understand them.
Thanks for any response!
You are trying to use Windows Forms functionality in a ASP.NET Web Page. Line 140:
FileDialog fldlg = new OpenFileDialog();
Windows Forms is desktop technology. You can't mix that with a ASP.NET web app. You can use the FileUploadControl to enable file uploads in your web application:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx
I'm fairly new to Flex\AS3
I'm using flash builder 4.5 for php and I'm trying to connect to my DB via remote objects.
I'm following adobes instructions as listed here:
http://help.adobe.com/en_US/flex/accessingdata/WSbde04e3d3e6474c4-668f02f4120d422cf08-7ffe.html#WSbde04e3d3e6474c4-668f02f4120d422cf08-7ffa
I've created the php service, and successfully finished the wizard.
I've tested my service with the Test tool and it is indeed returning my results.
My problem is that it seems that flash builder didn't create the service's files(super+base) at all. For example, when I drag the service into a dropdown component I get an error saying that the service component can't be found.
Does anyone know this issue happens? how can the test tool work if the service classes don't exist?
Thanks in advance,
Ravid
The problem was that I didn't checkout the files before using the wizard so flash builder didn't have write permissions on the files and therefore didn't create the necessary files.
once he had the write permissions - everything worked just fine