I'm using MQA and I'm trying to edit the form fields where the fields are declared to send feedback or bug report. I understand that default activities declared:
<activity android:name="com.ibm.mqa.ui.ProblemActivity" />
<activity android:name="com.ibm.mqa.ui.FeedbackActivity" />
<activity android:name="com.ibm.mqa.ui.ScreenshotEditorActivity" />
I have been reading the documentation and I have not found a way to edit these views / layouts.
You aren't able to edit the way the MQA form looks or functions when submitting bugs or feedback.
Related
We are doing an app for a client an he needs some similar functionality to this (see picture attached) offered by the iTranslate App on iOS.
With this functionality, when you are in any other App (for instance reading anything on the Medium App) and you select a word, a menu appears and you can select to open this word with the app of my client. But instead of opening the whole App and closing the one were are using, a kind of pop up appears:
I have a few questions about this:
- Does this have a name?
- Can something like this be done with Ionic or you need to code the app in Native?
- Is this possible only on iOS or also in Android?
I am really lost about this issue and would appreciate some guidance.
Thanks
The example in the first picture would be called a "Floating Context Menu," according to the Android Developers website. The example in the second picture would be called a "Popup Menu."
Hope this helps! Good Luck!
You can use a text selection toolbar https://material.io/design/platform-guidance/android-text-selection-toolbar.html# for this, which was added in Android 6.0. Note that you can only use this on Android 6.0 and later.
There is a nice article here, which provides some examples on how to create this:
https://medium.com/androiddevelopers/custom-text-selection-actions-with-action-process-text-191f792d2999
From the article, the basic implementation is the following:
AndroidManifest.xml
<activity
android:name=".ProcessTextActivity"
android:label="#string/process_text_action_name">
<intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
ProcessTextActivity.java
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.process_text_main);
CharSequence text = getIntent()
.getCharSequenceExtra(Intent.EXTRA_PROCESS_TEXT);
// process the text
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_PROCESS_TEXT, result);
setResult(RESULT_OK, intent);
}
So, I am pretty sure you can implement this in ionic. I never wrote anything in ionic, but you may be able to call something like this Java code from it.
This is a customized PopupWindow(Android Documentation) which should not be a major issue to cook up with something like PopoverController (Iconic Documentation).
the real problem you will face is the text selection. you can look into this stackoverflow link for pointers.
Solutions like these may work in one or the other platform you have to muck the code unless there is and api for text selection in iconic.
if iconic does not give you the API you will have to roll up your sleeves. At this point you are on a slippery slope looking over the webview(s).
Update:
All the above juggling is needed to implement this within your app. Android and iOS will not allow you to add items to system context menu as you see in an PC based(Windows/MacOS/...) OS(s).
If you check Google Translator app in Android. it listens clipboard copy event and pops up a transient icon over other apps. in iOS drawing over other app is not possible.
So if you want your feature to show up in Medium App then they have to add the UI and they have to call your 'API'.
In a business context (not commercial app), I need to avoid middle button click behaviour, that is to say displaying Home Screen
I spent hours browsing Stackoverflow pages, and the conclusion is often :
it's not possible, regarding obvious security considerations
My need is a bit different :
I use a connected mouse, I don't want to override device hardware button.
my app will only be use in a business context, not publicly.
Details :
my device is a Samsung Galaxy 3 (Model Number GT-P5210, Android version 4.2.2)
the mouse is a classical 3-buttons mouse (left-click, mouse wheel, right-click)
I can accept :
to override OnPause, OnUserLeaveEvents (https://stackoverflow.com/a/32938986/2773267 doesn't work in my case)
to modify my manifest
to use a service (watchdog-like), that prevent Home display
to root the device (last-chance solution):
modify /system/usr/keylayout (part of https://stackoverflow.com/a/29311126/2773267 answer)
all others solution, excepted those I can't accept :)
I can't accept :
using service (as in http://www.piwai.info/chatheads-basics/)
--
Thanks, Jerome.
Excuse my awful english, I'm french !
Putting this 3 lines to the manifest solved the problem.
Firstly it didn't work because I made a mistake on activity name
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Thanks !
--
Jerome
You can build your app as a HOME-screen replacement. In this case, your app IS the HOME-screen, so pressing HOME does nothing.
I am creating an app using Wikitude API, but I haven't been able to customize the view.
I have asked the developers and I know I can't add buttons to the main view in the current release version (for Android), but I am wondering if I can add more buttons to the options menu. Right now when I press it I get just one button that says "Ignore Altitude" can I modify that button and/or add more buttons to that menu?
I have checked other posts but there aren't any answers. The posts are a little bit old so that is why I am asking again.
I haven't found any useful documentation.
Any help is greatly appreciated
if I understood your question correctly, then please try the following: in the method prepareIntent() of your main Activity, you can add up to 3 menu items:
intent.setMenuItem1("Menu 1", YourActivity.CALLBACK_INTENT);
intent.setMenuItem2("Menu 2", YourActivity.ANOTHERCALLBACK_INTENT);
Then you define the callback function as another activity (with dialog, list and stuffs). It works fine this way for me.
I am also playing around a bit with Wikitude, but hard to find something well documented!
Yes , You can Add upto three menu button as if you read doc properly
intent.setMenuItem1("Menu Name", YourActivity.LOCATION_INTENT);
intent.setMenuItem2("Menu Name", YourActivity.LOCATION_THREATS);
intent.setMenuItem3("Menu Name", YourActivity.MAP_INTENT);
With making Intent variable as
public static final String LOCATION_INTENT = "wikitudeapi.mylocationactivity";
Also declare action in manifest as,
<activity android:name=".activities.Your Activity Name"
android:theme="#*android:style/Theme.Translucent.NoTitleBar"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="wikitudeapi.mylocationactivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Hello i'm building a custom application.
PRE:
The app will be restricted to a limited amount of user. ( let's say 20 people )
The app should be unique per each user so each apk will refer to a user only.
Each app should have a different package name
So i was starting to think a building script that takes the user list and creates 20 apks ( one for each user ) and updates the strings.xml file with the custom modification needed per-user.
But i really don't know where to start. Is there a good way or a tutorial where i can refer to ?
Just to be clear i'd like to have a manifest like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="$pname"
android:versionCode="1"
android:versionName="1.0">
<application>...</application>
</manifest>
And then replace the $pname using ant.
Perhaps you are looking for the aapt command. It has an additional flag --rename-manifest-package. The help says
Rewrite the manifest so that its package name is the package name
given here. Relative class names (for example .Foo) will be
changed to absolute names with the old package so that the code
does not need to change.
I would be using 20 different semi-empty default activities (one per each of users) located in 20 different packages extending 1 real activity, like:
mypackage.user01.MyMainActivity extends mypackage.MyMainActivity;
mypackage.user02.MyMainActivity extends mypackage.MyMainActivity;
mypackage.user03.MyMainActivity extends mypackage.MyMainActivity;
...
mypackage.user20.MyMainActivity extends mypackage.MyMainActivity;
And then 20 different androidmanifests.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mypackage.userXX">
<application
android:icon="#drawable/MyIcon"
android:label="#string/MyApplication"
>
<activity android:name=".MyActivity"
android:label="#string/MyActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="mypackage.MyActivity"
android:label="#string/MyActivity"/>
<activity
android:name="mypackage.user01.MyActivity"
android:label="#string/MyActivity"/>
<!-- etc. till user20 -->
</application>
</manifest>
which will be copied using simple Ant copy tasks to real one - it's easy to implement, though a bit boring :)
It might be simpler if you store 20 codes in your app, and give one code to each customer. Then just give each customer the same application. The application changes its properties depending on what code was entered.
If this sounds like the right approach, I'll see if I can code some specific aspects. If it isn't the approach you're after, please could you give me a bit more information on how these 20 people would be identified?
You could also use some unique device-identifier. There was an intersting article about that on the Android Developers Blog.
If you want to create a build-script, you can use Ant.
I have an existing android app.
I added a simple widget to it using the following:
updated my manifest with a <receiver> block which provides information about my AppWidgetProvider implementation
added a new xml files in res/xml with a <appwidget-provider> element that contains the height/width/updatePeriod/initialLayout/icon/label attributes
added a simple default layout with an ImageView and a TextView
implemented my AppWidgetProvider
When I build and deploy this to the emulator my Widget doesn't show up in the list of widgets. Am I missing some step to 'install' the widget? Do I need to do anything special to make it appear in the emulator?
EDIT:
Here's what my manifest receiver looks like:
<receiver android:name=".MyAppWidgetProvider"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/my_appwidget_info" />
</receiver>
and here's what my my_appwidget_info.xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:icon="#drawable/ic_logo"
android:label="MySampleApp"
android:minWidth="294dp"
android:minHeight="72dp"
android:updatePeriodMillis="86400000"
android:initialLayout="#layout/my_app_widget" >
</appwidget-provider>
Does your receiver tag in the manifest have the proper intent-filter and meta-data? It should look like the example in the documentation:
<receiver android:name="MyAppWidgetProvider" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/my_appwidget_info" />
</receiver>
The receiver needs both of those pieces to be recognized as an app widget.
Edit: The <receiver> tags also need to be located inside the <application> tags.
If your app is installed on the SD card, all your widgets will quietly refuse to show up in the list. (The docs do make it clear that you can't have widgets if you're on the external storage).
You can go to the settings in the home screen, go to Applications, and go to your app. If it offers you to "Move to phone", then it is on the SD card. You can set the install location to internalOnly to prevent it from going onto the SD card.
If you do allow installation on SD card (because users will typically ask for that), they need to be clear that they can't have the widget in that case. If an app is on SD card and you want to use the widget, you first have to move the app back to internal storage and then reset the phone (!).
I had the same issue as well. A few things to check that can stop it from showing up on different models.
1)Must have a minHeight and minWidth set on AppWidget-Provider in the xml, if you remove either of those and launch in emulator, your widget will be gone.
2)Some models have issues if you don't supply a previewImage in the AppWidget-Provider
3)Some models can have issues if you install on the SD Card rather than internally, although I still prefer to install on SD Card.
4)Some models need to have an Activity with Main and Launcher defined even if you don't intend on using any Activities. (You can simply make a dummy one that says 'this is a widget app only'
5)You have to have your manifest setup correctly as shown in TinJa's answer.
I fought through this for quite a while before finally getting it to show up in all models and emulators, so be patient, make sure you aren't missing anything and set the values that need to be there. Remember some phones cache the Widget List and may not update until you have launched your first Activity or Rebooted the phone.
Hope that helps.
Sam
I had the same problem then I finally figure it out. Usually when you emulate an application, it has an activity to load. For a widget-only app, that isn't the case, but the IDE still thinks you're trying to launch an activity.
To change this go to your Build Options
then change the Launch Options to Nothing
I had the same problem. It turned out I accidentally had two meta-data resource xml files in two different folders, my "layout" folder and my "xml" folder. It was finding the (empty) resource in "layout" first, and using that for its meta-data.
It was a stupid mistake, but make sure you have only one xml file of that name that's pointed to in your receiver meta-data tag. Also I think it should always be in the xml folder.
I had the same problem.
And my problem was that I have /layout/main.xml file when I delete it the widget appear!
It sound like #ubzack answer but I think he talk about something else [same xml file name]