codenameone

codename one. How to share a link to your app.

六眼飞鱼酱① 提交于 2019-12-08 19:06:29
What I want to achieve here is similar to what most apps do, specifically like Youtube. If I share a video on youtube the user gets a link to the video. When the link is clicked the user is automatically taken to the video in the Youtube app (if the user has the app). I want that sort of functionality. My app has different stores on it and information about the store. I want the user to be able to "Share" a store via Whatsapp, sms etc so then when the receiver clicks on the shared link they are automatically taken to that specific store's page INSIDE my app. And if they do not have the app the

Native Back on Codenameone after using Toolbar class

老子叫甜甜 提交于 2019-12-08 13:15:27
When I use the Toolbar class to customize my Toolbar for added functionality the native back command disappears, is there a way of getting it back? Diamond What do you mean disappear? This is how i use Toolbar API: Toolbar t = new Toolbar(); myForm.setToolbar(t); t.setTitle("My title"); Command back = new Command("back") { @Override public void actionPerformed(ActionEvent evt) { myForm.showBack(); } }; myForm.setBackCommand(back); t.addCommandToLeftBar(back); This will take care of both Android hardware back button and placing a back command at the top. Note that you also have to style

unable to build codename one app after adding admobfullscreen lib

亡梦爱人 提交于 2019-12-08 10:06:41
问题 I have just completed my app,all good and fine till i added the admob fullscreen lib file and followed the instructions there. it works on the simulator(just shows the codename one icon as the ad content). on building the app, i get an error from the build servers. something like this: Compiling with JDK Java compiler API. /tmp/build2300287277349891895xxx/MyApplication/src/main/java/com/codename1/admob/AdMobNativeImpl.java:3: error: package com.google.android.gms.ads does not exist import com

SQLite - no errors, however, no data uploaded to DB

空扰寡人 提交于 2019-12-08 09:41:57
问题 I have developed a mobile application using the CodeName One plugin for Java in the Netbeans IDE. CodeName One uses the Database API. https://www.codenameone.com/javadoc/com/codename1/db/Database.html I'm running some tests (there are around 10 values I would like to upload, however, just testing the connection ect by uploading ID, Fname and Lname values. Database db = null; Cursor cur = null; String Fname = findTxtFirstn(c).getText(); String Lname = findTxtLastn(c).getText(); try{ Database

Missing App Store icon codename one build

时间秒杀一切 提交于 2019-12-08 09:06:51
I have created an app using codename one. It uploads to the google store for testing fine but when I try to upload it for TestFlight using the App Loader I get an error: "Missing App Store Icon. iOS Apps must include a 1024x1024px App Store Icon in PNG format. Without providing the icon in the Asset Catalog or via iTunes Connect, apps cannot be submitted for App Review or Beta App Review. Refer to https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/ for more information." I have already uploaded a couple of versions for testing and they have uploaded fine. I

How to locate environment path in codename one

耗尽温柔 提交于 2019-12-08 08:46:55
问题 For the following commands to work, make sure you have "ant", "mvn", and "git" in your environment PATH. pls I need to add the following to the environment part. $ git clone https://github.com/shannah/cn1-iap-demo-server $ cd cn1-iap-demo-server $ ant install-deps. I dont know how to locate environment path on my system. pls help 回答1: That's Unix/Linux and unrelated to Codename One. One would setup an environment path as such: export PATH=/path/to/ant/binary:$PATH 来源: https://stackoverflow

Codename One - RegexConstraint to check a valid phone number

人盡茶涼 提交于 2019-12-08 08:43:27
In the following code, the RegexConstraint doesn't work, because the phone number results always incorrect. What's wrong? I need to check a mobile phone number (without the country code). For example, the input 3652312453 should be correct, but in the following code it's evaluated as incorrect. I copied the regex from the discussion linked in the comment: my only requirement is a valid phone number. (Note: this question is not for generic Java, but only for Codename One. The class "CountryCodePicker" extends the class "Button": I reported it to make it clear that the phone number and the

Null Pointer Exception in CodeNameone

穿精又带淫゛_ 提交于 2019-12-08 08:43:18
问题 I would like to apply css to my codename one application, I have downloaded cn1css-ant-task.jar from git hub and put in my lib directory and I applied css to my app, everything is working fine but after some time I got an error. 回答1: The exception you are getting from the CSS processor is "unsupported property": Overflow . Don't use overflow in the CSS used with Codename One. Notice that you can't just get an arbitrary CSS off the internet and use it. 来源: https://stackoverflow.com/questions

Codename One: Save Image to Storage and create small rounded preview

家住魔仙堡 提交于 2019-12-08 08:40:31
I have to problem with Images currently: 1) I can't save an Image to Storage because it is not supported to store it directly to the storage. I want users to be able to take a photo with the camera and then the created Photo has to be saved somewhere, so I can retrieve it later on again. Could you tell me how a) To save an Image b) How to retrieve it I found this Code piece made by Shai in Stackoverflow where another user asked how to save Images to Storage also. InputStream stream = FileSystemStorage.getInstance().openInputStream(i); OutputStream out = Storage.getInstance().createOutputStream

Get IMSI from the SIM using codename1

百般思念 提交于 2019-12-08 08:33:15
问题 I need to get the IMSI (International Mobile Subsriber Identity) stored in the SIM card using codename1. Also in the case of dual or tri SIM phones, i need to get the IMSI for each SIM. Please, How do i get it? 回答1: Display.getMsisdn() will work for some devices but most don't allow accessing that information. For more information you can just use a native interface if you can access it that way. 回答2: Another way to get IMSI for dual Sim device: Try this .. its working for me. Idea is to call